ILIAS  release_8 Revision v8.23
ilDclFieldProperty Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ 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 ()
 Return the Name of your Connector Table More...
 
 setConnectorContainerName (string $connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0)
 
 storeObjectToCache ()
 
 asStdClass ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $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 ()
 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 ()
 never use in ILIAS Core, Plugins only More...
 
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, array $fields=array(' *'), string $operator='=', $both_external=false)
 
static innerjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static leftjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static orderBy ($orderBy, string $orderDirection='ASC')
 
static dateFormat (string $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 (bool $set_raw=true)
 
static getArray (?string $key=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 ()
 Returns an instance of the instatiated calling active record (needs to be done in static methods) : This should be cached somehow More...
 
static fromCamelCase (string $str)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Constructor & Destructor Documentation

◆ __construct()

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

ilDclFieldProperty constructor.

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

References ILIAS\GlobalScreen\Provider\__construct().

60  {
61  parent::__construct($primary_key);
62  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ afterObjectLoad()

ilDclFieldProperty::afterObjectLoad ( )

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

References deserializeData().

130  : void
131  {
132  $this->value = $this->deserializeData($this->value);
133  }
deserializeData(string $value)
Deserialize data before applying to field.
+ Here is the call graph for this function:

◆ create()

ilDclFieldProperty::create ( )

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

References serializeData().

118  : void
119  {
120  $this->value = $this->serializeData($this->value);
121  parent::create();
122  }
serializeData($value)
Serialize data before storing to db.
+ 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 152 of file class.ilDclFieldProperty.php.

References $value.

Referenced by afterObjectLoad().

153  {
154  $deserialize = json_decode($value, true);
155  if (is_array($deserialize)) {
156  return $deserialize;
157  }
158 
159  return $value;
160  }
+ Here is the caller graph for this function:

◆ getFieldId()

ilDclFieldProperty::getFieldId ( )

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

References $field_id.

82  : int
83  {
84  return $this->field_id;
85  }

◆ getId()

ilDclFieldProperty::getId ( )

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

References $id.

72  : int
73  {
74  return $this->id;
75  }

◆ getName()

ilDclFieldProperty::getName ( )

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

References $name.

92  : string
93  {
94  return $this->name;
95  }

◆ getValue()

ilDclFieldProperty::getValue ( )
Returns
string|array

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

References $value.

106  {
107  return $this->value;
108  }

◆ returnDbTableName()

static ilDclFieldProperty::returnDbTableName ( )
static

Return the Name of your Database Table

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

67  : string
68  {
69  return "il_dcl_field_prop";
70  }

◆ serializeData()

ilDclFieldProperty::serializeData (   $value)

Serialize data before storing to db.

Parameters
int | string | array$value

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

References $value.

Referenced by create(), and update().

139  : string
140  {
141  if (is_array($value)) {
142  $value = json_encode($value);
143  }
144 
145  return (string) $value;
146  }
+ Here is the caller graph for this function:

◆ setFieldId()

ilDclFieldProperty::setFieldId ( int  $field_id)

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

References $field_id.

87  : void
88  {
89  $this->field_id = $field_id;
90  }

◆ setId()

ilDclFieldProperty::setId ( int  $id)

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

References $id.

77  : void
78  {
79  $this->id = $id;
80  }

◆ setName()

ilDclFieldProperty::setName ( string  $name)

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

References $name.

97  : void
98  {
99  $this->name = $name;
100  }

◆ setValue()

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

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

References $value.

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

◆ update()

ilDclFieldProperty::update ( )

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

References serializeData().

124  : void
125  {
126  $this->value = $this->serializeData($this->value);
127  parent::update();
128  }
serializeData($value)
Serialize data before storing to db.
+ Here is the call graph for this function:

Field Documentation

◆ $field_id

int ilDclFieldProperty::$field_id = 0
protected

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

Referenced by getFieldId(), and setFieldId().

◆ $id

int ilDclFieldProperty::$id
protected

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

Referenced by getId(), and setId().

◆ $name

string ilDclFieldProperty::$name = ""
protected

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

Referenced by getName(), and setName().

◆ $value

ilDclFieldProperty::$value
protected

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

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


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