ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTermsOfServiceDocument Class Reference

Class ilTermsOfServiceDocument. More...

+ Inheritance diagram for ilTermsOfServiceDocument:
+ Collaboration diagram for ilTermsOfServiceDocument:

Public Member Functions

 content ()
 
Returns
string
More...
 
 title ()
 
Returns
string
More...
 
 id ()
 
Returns
int
More...
 
 read ()
 
 buildFromArray (array $array)
 
 criteria ()
 
Returns
[]
More...
 
 detachCriterion (\ilTermsOfServiceDocumentCriterionAssignment $criterionAssignment)
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 
 setConnectorContainerName ($connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0, arConnector $connector=null)
 
 storeObjectToCache ()
 
 __getConvertedDateFieldsAsArray ($format=null)
 
 __asCsv ($separator=';', $header=false)
 
 __asArray ()
 
 __asStdClass ()
 
 __asSerializedObject ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForDb ()
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy ($new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField ($old_name, $new_name)
 
static tableExists ()
 
static fieldExists ($field_name)
 
static removeDBField ($field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 
static preloadObjects ()
 
static additionalParams (array $additional_params)
 
static findOrFail ($primary_key, array $add_constructor_args=array())
 Tries to find the object and throws an Exception if object is not found, instead of returning null. More...
 
static findOrGetInstance ($primary_key, array $add_constructor_args=array())
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $ar, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static innerjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static leftjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static orderBy ($orderBy, $orderDirection='ASC')
 
static dateFormat ($date_format='d.m.Y - H:i:s')
 
static limit ($start, $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $connector)
 
static raw ($set_raw=true)
 
static getArray ($key=null, $values=null)
 
static _toCamelCase ($str, $capitalise_first_char=false)
 

Data Fields

const TABLE_NAME = 'tos_documents'
 
- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 

Protected Attributes

 $id
 
 $creation_ts = 0
 
 $modification_ts = 0
 
 $owner_usr_id = 0
 
 $last_modified_usr_id = ''
 
 $sorting = 0
 
 $title = ''
 
 $text = ''
 
 $criteria = []
 
 $initialPersistedCriteria = []
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Private Attributes

 $criteriaFetched = false
 

Additional Inherited Members

- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv. More...
 
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 
static fromCamelCase ($str)
 

Detailed Description

Member Function Documentation

◆ buildFromArray()

ilTermsOfServiceDocument::buildFromArray ( array  $array)

Definition at line 137 of file class.ilTermsOfServiceDocument.php.

References $criteria, ActiveRecord\count(), ActiveRecord\create(), criteria(), League\Flysystem\Adapter\Polyfill\update(), and ActiveRecord\update().

138  {
139  $document = parent::buildFromArray($array);
140 
141  $this->fetchAllCriterionAssignments();
142 
143  return $document;
144  }
+ Here is the call graph for this function:

◆ content()

ilTermsOfServiceDocument::content ( )

Returns
string

Implements ilTermsOfServiceSignableDocument.

Definition at line 103 of file class.ilTermsOfServiceDocument.php.

References $text.

103  : string
104  {
105  return $this->text;
106  }

◆ criteria()

ilTermsOfServiceDocument::criteria ( )

Returns
[]

Implements ilTermsOfServiceSignableDocument.

Definition at line 212 of file class.ilTermsOfServiceDocument.php.

References $criteria, ilTermsOfServiceDocumentCriterionAssignment\getCriterionId(), and ilTermsOfServiceDocumentCriterionAssignment\getCriterionValue().

Referenced by buildFromArray(), and detachCriterion().

212  : array
213  {
214  return $this->criteria;
215  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ detachCriterion()

ilTermsOfServiceDocument::detachCriterion ( \ilTermsOfServiceDocumentCriterionAssignment  $criterionAssignment)
Parameters

Definition at line 241 of file class.ilTermsOfServiceDocument.php.

References $criteria, ActiveRecord\count(), criteria(), ilTermsOfServiceDocumentCriterionAssignment\equals(), ilTermsOfServiceDocumentCriterionAssignment\getCriterionId(), ilTermsOfServiceDocumentCriterionAssignment\getCriterionValue(), and ActiveRecord\where().

242  {
243  $numCriteriaBeforeRemoval = count($this->criteria);
244 
245  $this->criteria = array_filter($this->criteria, function (\ilTermsOfServiceDocumentCriterionAssignment $currentAssignment) use ($criterionAssignment) {
246  return !$currentAssignment->equals($criterionAssignment);
247  });
248 
249  $numCriteriaAfterRemoval = count($this->criteria);
250 
251  if ($numCriteriaAfterRemoval === $numCriteriaBeforeRemoval) {
252  throw new \OutOfBoundsException(sprintf(
253  "Could not find any criterion with criterion typeIdent %s and value: %s",
254  $criterionAssignment->getCriterionId(),
255  var_export($criterionAssignment->getCriterionValue(), 1)
256  ));
257  }
258  }
+ Here is the call graph for this function:

◆ id()

ilTermsOfServiceDocument::id ( )

Returns
int

Implements ilTermsOfServiceSignableDocument.

Definition at line 119 of file class.ilTermsOfServiceDocument.php.

References $id.

119  : int
120  {
121  return $this->id;
122  }

◆ read()

ilTermsOfServiceDocument::read ( )

Definition at line 127 of file class.ilTermsOfServiceDocument.php.

128  {
129  parent::read();
130 
131  $this->fetchAllCriterionAssignments();
132  }

◆ returnDbTableName()

static ilTermsOfServiceDocument::returnDbTableName ( )
static

Definition at line 95 of file class.ilTermsOfServiceDocument.php.

96  {
97  return self::TABLE_NAME;
98  }

◆ title()

ilTermsOfServiceDocument::title ( )

Returns
string

Implements ilTermsOfServiceSignableDocument.

Definition at line 111 of file class.ilTermsOfServiceDocument.php.

References $title.

111  : string
112  {
113  return $this->title;
114  }

Field Documentation

◆ $creation_ts

ilTermsOfServiceDocument::$creation_ts = 0
protected

Definition at line 28 of file class.ilTermsOfServiceDocument.php.

◆ $criteria

ilTermsOfServiceDocument::$criteria = []
protected

Definition at line 80 of file class.ilTermsOfServiceDocument.php.

Referenced by buildFromArray(), criteria(), and detachCriterion().

◆ $criteriaFetched

ilTermsOfServiceDocument::$criteriaFetched = false
private

Definition at line 90 of file class.ilTermsOfServiceDocument.php.

◆ $id

ilTermsOfServiceDocument::$id
protected

Definition at line 20 of file class.ilTermsOfServiceDocument.php.

Referenced by id().

◆ $initialPersistedCriteria

ilTermsOfServiceDocument::$initialPersistedCriteria = []
protected

Definition at line 85 of file class.ilTermsOfServiceDocument.php.

◆ $last_modified_usr_id

ilTermsOfServiceDocument::$last_modified_usr_id = ''
protected

Definition at line 52 of file class.ilTermsOfServiceDocument.php.

◆ $modification_ts

ilTermsOfServiceDocument::$modification_ts = 0
protected

Definition at line 36 of file class.ilTermsOfServiceDocument.php.

◆ $owner_usr_id

ilTermsOfServiceDocument::$owner_usr_id = 0
protected

Definition at line 44 of file class.ilTermsOfServiceDocument.php.

◆ $sorting

ilTermsOfServiceDocument::$sorting = 0
protected

Definition at line 60 of file class.ilTermsOfServiceDocument.php.

◆ $text

ilTermsOfServiceDocument::$text = ''
protected

Definition at line 75 of file class.ilTermsOfServiceDocument.php.

Referenced by content().

◆ $title

ilTermsOfServiceDocument::$title = ''
protected

Definition at line 68 of file class.ilTermsOfServiceDocument.php.

Referenced by title().

◆ TABLE_NAME

const ilTermsOfServiceDocument::TABLE_NAME = 'tos_documents'

Definition at line 10 of file class.ilTermsOfServiceDocument.php.


The documentation for this class was generated from the following file: