ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDclSelectionOption Class Reference
+ Inheritance diagram for ilDclSelectionOption:
+ Collaboration diagram for ilDclSelectionOption:

Public Member Functions

 getId ()
 
 setId (int $id)
 
 getFieldId ()
 
 setFieldId (int $field_id)
 
 getOptId ()
 
 setOptId (int $opt_id)
 
 getValue ()
 
 setValue (string $value)
 
 getSorting ()
 
 setSorting (int $sorting)
 
 cloneOption (ilDclSelectionOption $original_option)
 
- 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 (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 ()
 
static flushOptions (int $field_id)
 
static getAllForField (int $field_id)
 
static getValues (int $field_id, $opt_ids)
 
- 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=[])
 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)
 

Data Fields

const DB_TABLE_NAME = "il_dcl_sel_opts"
 

Protected Attributes

int $id
 
int $field_id
 
int $opt_id
 
int $sorting
 
string $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

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

Member Function Documentation

◆ cloneOption()

ilDclSelectionOption::cloneOption ( ilDclSelectionOption  $original_option)
Parameters
ilDclSelectionOption$original_option

Definition at line 182 of file class.ilDclSelectionOption.php.

References getOptId(), getSorting(), getValue(), setOptId(), setSorting(), and setValue().

182  : void
183  {
184  $this->setValue($original_option->getValue());
185  $this->setSorting($original_option->getSorting());
186  $this->setOptId($original_option->getOptId());
187  }
+ Here is the call graph for this function:

◆ flushOptions()

static ilDclSelectionOption::flushOptions ( int  $field_id)
static

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

Referenced by ilDclSelectionFieldModel\setProperty().

138  : void
139  {
140  foreach (self::getAllForField($field_id) as $option) {
141  $option->delete();
142  }
143  }
+ Here is the caller graph for this function:

◆ getAllForField()

static ilDclSelectionOption::getAllForField ( int  $field_id)
static

◆ getFieldId()

ilDclSelectionOption::getFieldId ( )

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

References $field_id.

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

◆ getId()

ilDclSelectionOption::getId ( )

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

References $id.

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

◆ getOptId()

ilDclSelectionOption::getOptId ( )

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

References $opt_id.

Referenced by cloneOption().

94  : int
95  {
96  return $this->opt_id;
97  }
+ Here is the caller graph for this function:

◆ getSorting()

ilDclSelectionOption::getSorting ( )

Definition at line 114 of file class.ilDclSelectionOption.php.

References $sorting.

Referenced by cloneOption().

114  : int
115  {
116  return $this->sorting;
117  }
+ Here is the caller graph for this function:

◆ getValue()

ilDclSelectionOption::getValue ( )

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

References $value.

Referenced by cloneOption().

104  : string
105  {
106  return $this->value;
107  }
+ Here is the caller graph for this function:

◆ getValues()

static ilDclSelectionOption::getValues ( int  $field_id,
  $opt_ids 
)
static
Parameters
array | string | int$opt_ids
Exceptions
arException

Definition at line 157 of file class.ilDclSelectionOption.php.

References ActiveRecord\orderBy().

Referenced by ilDclSelectionRecordRepresentation\getHTML(), ilDclDateSelectionRecordFieldModel\parseExportValue(), and ilDclSelectionRecordFieldModel\parseExportValue().

157  : array
158  {
159  $operators = ['field_id' => '='];
160  if (is_array($opt_ids)) {
161  if (empty($opt_ids)) {
162  return [];
163  }
164  $operators['opt_id'] = 'IN';
165  } else {
166  $operators['opt_id'] = '=';
167  }
168  $return = [];
169  foreach (self::where(
170  ["field_id" => $field_id, "opt_id" => $opt_ids],
171  $operators
172  )->orderBy('sorting')->get() as $opt) {
173  $return[] = $opt->getValue();
174  }
175 
176  return $return;
177  }
static orderBy(string $orderBy, string $orderDirection='ASC')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnDbTableName()

static ilDclSelectionOption::returnDbTableName ( )
static

Definition at line 25 of file class.ilDclSelectionOption.php.

25  : string
26  {
27  return self::DB_TABLE_NAME;
28  }

◆ setFieldId()

ilDclSelectionOption::setFieldId ( int  $field_id)

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

References $field_id.

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

◆ setId()

ilDclSelectionOption::setId ( int  $id)

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

References $id.

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

◆ setOptId()

ilDclSelectionOption::setOptId ( int  $opt_id)

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

References $opt_id.

Referenced by cloneOption().

99  : void
100  {
101  $this->opt_id = $opt_id;
102  }
+ Here is the caller graph for this function:

◆ setSorting()

ilDclSelectionOption::setSorting ( int  $sorting)

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

References $sorting.

Referenced by cloneOption().

119  : void
120  {
121  $this->sorting = $sorting;
122  }
+ Here is the caller graph for this function:

◆ setValue()

ilDclSelectionOption::setValue ( string  $value)

Definition at line 109 of file class.ilDclSelectionOption.php.

References $value.

Referenced by cloneOption().

109  : void
110  {
111  $this->value = $value;
112  }
+ Here is the caller graph for this function:

Field Documentation

◆ $field_id

int ilDclSelectionOption::$field_id
protected

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

Referenced by getFieldId(), and setFieldId().

◆ $id

int ilDclSelectionOption::$id
protected

Definition at line 40 of file class.ilDclSelectionOption.php.

Referenced by getId(), and setId().

◆ $opt_id

int ilDclSelectionOption::$opt_id
protected

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

Referenced by getOptId(), and setOptId().

◆ $sorting

int ilDclSelectionOption::$sorting
protected

Definition at line 64 of file class.ilDclSelectionOption.php.

Referenced by getSorting(), and setSorting().

◆ $value

string ilDclSelectionOption::$value
protected

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

Referenced by getValue(), and setValue().

◆ DB_TABLE_NAME

const ilDclSelectionOption::DB_TABLE_NAME = "il_dcl_sel_opts"

Definition at line 23 of file class.ilDclSelectionOption.php.


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