ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilDclFieldProperty Class Reference

Class ilDclFieldProperty. More...

+ Inheritance diagram for ilDclFieldProperty:
+ Collaboration diagram for ilDclFieldProperty:

Public Member Functions

 __construct ($primary_key=0, $connector=null)
 ilDclFieldProperty constructor. More...
 
 getId ()
 
 setId ($id)
 
 getFieldId ()
 
 setFieldId ($field_id)
 
 getName ()
 
 setName ($name)
 
 getValue ()
 
 setValue ($value)
 
 create ()
 
 update ()
 
 afterObjectLoad ()
 
 serializeData ($value)
 Serialize data before storing to db. More...
 
 deserializeData ($value)
 Deserialize data before applying to field. More...
 
- 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)
 

Protected Attributes

 $id
 
 $field_id
 
 $name
 
 $value
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Additional Inherited Members

- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 
- 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

Constructor & Destructor Documentation

◆ __construct()

ilDclFieldProperty::__construct (   $primary_key = 0,
  $connector = null 
)

ilDclFieldProperty constructor.

Parameters
int$primary_key
null$connector

Definition at line 66 of file class.ilDclFieldProperty.php.

67  {
68  parent::__construct($primary_key, $connector);
69  }

Member Function Documentation

◆ afterObjectLoad()

ilDclFieldProperty::afterObjectLoad ( )

Definition at line 176 of file class.ilDclFieldProperty.php.

References deserializeData().

177  {
178  $this->value = $this->deserializeData($this->value);
179  }
deserializeData($value)
Deserialize data before applying to field.
+ Here is the call graph for this function:

◆ create()

ilDclFieldProperty::create ( )

Definition at line 156 of file class.ilDclFieldProperty.php.

References serializeData().

157  {
158  $this->value = $this->serializeData($this->value);
159  parent::create();
160  }
serializeData($value)
Serialize data before storing to db.
+ Here is the call graph for this function:

◆ deserializeData()

ilDclFieldProperty::deserializeData (   $value)

Deserialize data before applying to field.

Parameters
$valuemixed
Returns
mixed

Definition at line 203 of file class.ilDclFieldProperty.php.

References $value.

Referenced by afterObjectLoad().

204  {
205  $deserialize = json_decode($value, true);
206  if (is_array($deserialize)) {
207  return $deserialize;
208  }
209  return $value;
210  }
+ Here is the caller graph for this function:

◆ getFieldId()

ilDclFieldProperty::getFieldId ( )
Returns
int

Definition at line 102 of file class.ilDclFieldProperty.php.

References $field_id.

103  {
104  return $this->field_id;
105  }

◆ getId()

ilDclFieldProperty::getId ( )
Returns
int

Definition at line 84 of file class.ilDclFieldProperty.php.

References $id.

85  {
86  return $this->id;
87  }

◆ getName()

ilDclFieldProperty::getName ( )
Returns
string

Definition at line 120 of file class.ilDclFieldProperty.php.

References $name.

121  {
122  return $this->name;
123  }

◆ getValue()

ilDclFieldProperty::getValue ( )
Returns
string

Definition at line 138 of file class.ilDclFieldProperty.php.

References $value.

139  {
140  return $this->value;
141  }

◆ returnDbTableName()

static ilDclFieldProperty::returnDbTableName ( )
static
Returns
string Return the Name of your Database Table

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

76  {
77  return "il_dcl_field_prop";
78  }

◆ serializeData()

ilDclFieldProperty::serializeData (   $value)

Serialize data before storing to db.

Parameters
$valuemixed
Returns
mixed

Definition at line 188 of file class.ilDclFieldProperty.php.

References $value.

Referenced by create(), and update().

189  {
190  if (is_array($value)) {
191  $value = json_encode($value);
192  }
193  return $value;
194  }
+ Here is the caller graph for this function:

◆ setFieldId()

ilDclFieldProperty::setFieldId (   $field_id)
Parameters
int$field_id

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

References $field_id.

112  {
113  $this->field_id = $field_id;
114  }

◆ setId()

ilDclFieldProperty::setId (   $id)
Parameters
int$id

Definition at line 93 of file class.ilDclFieldProperty.php.

References $id.

94  {
95  $this->id = $id;
96  }

◆ setName()

ilDclFieldProperty::setName (   $name)
Parameters
string$name

Definition at line 129 of file class.ilDclFieldProperty.php.

References $name.

130  {
131  $this->name = $name;
132  }

◆ setValue()

ilDclFieldProperty::setValue (   $value)
Parameters
string$value

Definition at line 147 of file class.ilDclFieldProperty.php.

References $value.

148  {
149  $this->value = $value;
150  }

◆ update()

ilDclFieldProperty::update ( )

Definition at line 166 of file class.ilDclFieldProperty.php.

References serializeData(), and League\Flysystem\Adapter\Polyfill\update().

167  {
168  $this->value = $this->serializeData($this->value);
169  parent::update();
170  }
serializeData($value)
Serialize data before storing to db.
update($pash, $contents, Config $config)
+ Here is the call graph for this function:

Field Documentation

◆ $field_id

ilDclFieldProperty::$field_id
protected

Definition at line 38 of file class.ilDclFieldProperty.php.

Referenced by getFieldId(), and setFieldId().

◆ $id

ilDclFieldProperty::$id
protected

Definition at line 27 of file class.ilDclFieldProperty.php.

Referenced by getId(), and setId().

◆ $name

ilDclFieldProperty::$name
protected

Definition at line 48 of file class.ilDclFieldProperty.php.

Referenced by getName(), and setName().

◆ $value

ilDclFieldProperty::$value
protected

Definition at line 57 of file class.ilDclFieldProperty.php.

Referenced by deserializeData(), getValue(), serializeData(), and setValue().


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