ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDclFieldProperty Class Reference
+ Inheritance diagram for ilDclFieldProperty:
+ Collaboration diagram for ilDclFieldProperty:

Public Member Functions

 __construct (?int $primary_key=0)
 ilDclFieldProperty constructor. More...
 
 getId ()
 
 setId (int $id)
 
 getFieldId ()
 
 setFieldId (int $field_id)
 
 getName ()
 
 setName (string $name)
 
 getValue ()
 
 setValue ($value)
 
 create ()
 
 update ()
 
 afterObjectLoad ()
 
 serializeData ($value)
 Serialize data before storing to db. More...
 
 deserializeData (string $value)
 Deserialize data before applying to field. More...
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 @description Return the Name of your Connector Table More...
 
 setConnectorContainerName (string $connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct (mixed $primary_key=0)
 
 storeObjectToCache ()
 
 asStdClass ()
 
 asArray ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, string $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy (int $new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 @description Return the Name of your Database Table More...
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField (string $old_name, string $new_name)
 
static tableExists ()
 
static fieldExists (string $field_name)
 
static removeDBField (string $field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 @depracated never use in ILIAS Core, Plugins only More...
 
static preloadObjects ()
 
static additionalParams (array $additional_params)
 
static findOrFail ($primary_key, array $add_constructor_args=[])
 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=[])
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $activeRecord, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static innerjoin (string $tablename, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static leftjoin (string $tablename, $on_this, string $on_external, array $fields=[' *'], string $operator='=', bool $both_external=false)
 
static orderBy (string $orderBy, string $orderDirection='ASC')
 
static dateFormat (string $date_format='d.m.Y - H:i:s')
 
static limit (int $start, int $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $arConnector)
 
static raw (bool $set_raw=true)
 
static getArray (?string $key=null, string|array|null $values=null)
 
static _toCamelCase (string $str, bool $capitalise_first_char=false)
 

Protected Attributes

int $id
 
int $field_id = 0
 
string $name = ""
 
 $value
 
- Protected Attributes inherited from ActiveRecord
bool $ar_safe_read = true
 
string $connector_container_name = ''
 
bool $is_new = true
 

Additional Inherited Members

- Protected Member Functions inherited from ActiveRecord
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 @description Returns an instance of the instatiated calling active record (needs to be done in static methods) @TODO : This should be cached somehow More...
 
static fromCamelCase (string $str)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilDclFieldProperty::__construct ( ?int  $primary_key = 0)

ilDclFieldProperty constructor.

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

62 {
63 parent::__construct($primary_key);
64 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ afterObjectLoad()

ilDclFieldProperty::afterObjectLoad ( )

Reimplemented from ActiveRecord.

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

129 : void
130 {
131 $this->value = $this->deserializeData($this->value);
132 }
deserializeData(string $value)
Deserialize data before applying to field.

References deserializeData().

+ Here is the call graph for this function:

◆ create()

ilDclFieldProperty::create ( )

Reimplemented from ActiveRecord.

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

117 : void
118 {
119 $this->value = $this->serializeData($this->value);
120 parent::create();
121 }
serializeData($value)
Serialize data before storing to db.

References serializeData().

+ Here is the call graph for this function:

◆ deserializeData()

ilDclFieldProperty::deserializeData ( string  $value)

Deserialize data before applying to field.

Returns
string|array

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

152 {
153 $deserialize = json_decode($value, true);
154 if (is_array($deserialize)) {
155 return $deserialize;
156 }
157
158 return $value;
159 }

References $value.

Referenced by afterObjectLoad().

+ Here is the caller graph for this function:

◆ getFieldId()

ilDclFieldProperty::getFieldId ( )

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

84 : int
85 {
86 return $this->field_id;
87 }

References $field_id.

◆ getId()

ilDclFieldProperty::getId ( )

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

74 : int
75 {
76 return $this->id;
77 }

References $id.

◆ getName()

ilDclFieldProperty::getName ( )

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

94 : string
95 {
96 return $this->name;
97 }

References $name.

◆ getValue()

ilDclFieldProperty::getValue ( )

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

104 : string
105 {
106 return $this->value;
107 }

References $value.

◆ returnDbTableName()

static ilDclFieldProperty::returnDbTableName ( )
static

@description Return the Name of your Database Table

Reimplemented from ActiveRecord.

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

69 : string
70 {
71 return "il_dcl_field_prop";
72 }

◆ serializeData()

ilDclFieldProperty::serializeData (   $value)

Serialize data before storing to db.

Parameters
int | string | array$value

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

138 : string
139 {
140 if (is_array($value)) {
141 $value = json_encode($value);
142 }
143
144 return (string) $value;
145 }

References $value.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ setFieldId()

ilDclFieldProperty::setFieldId ( int  $field_id)

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

89 : void
90 {
91 $this->field_id = $field_id;
92 }

References $field_id.

◆ setId()

ilDclFieldProperty::setId ( int  $id)

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

79 : void
80 {
81 $this->id = $id;
82 }

References $id.

◆ setName()

ilDclFieldProperty::setName ( string  $name)

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

99 : void
100 {
101 $this->name = $name;
102 }

References $name.

◆ setValue()

ilDclFieldProperty::setValue (   $value)
Parameters
string | array | int$value

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

112 : void
113 {
114 $this->value = $value;
115 }

References $value.

◆ update()

ilDclFieldProperty::update ( )

Reimplemented from ActiveRecord.

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

123 : void
124 {
125 $this->value = $this->serializeData($this->value);
126 parent::update();
127 }

References serializeData().

+ Here is the call graph for this function:

Field Documentation

◆ $field_id

int ilDclFieldProperty::$field_id = 0
protected

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

Referenced by getFieldId(), and setFieldId().

◆ $id

int ilDclFieldProperty::$id
protected

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

Referenced by getId(), and setId().

◆ $name

string ilDclFieldProperty::$name = ""
protected

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

Referenced by getName(), and setName().

◆ $value

ilDclFieldProperty::$value
protected

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

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


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