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

Class ilDclSelectionOption. More...

+ Inheritance diagram for ilDclSelectionOption:
+ Collaboration diagram for ilDclSelectionOption:

Public Member Functions

 getId ()
 
 setId ($id)
 
 getFieldId ()
 
 setFieldId ($field_id)
 
 getOptId ()
 
 setOptId ($opt_id)
 
 getValue ()
 
 setValue ($value)
 
 getSorting ()
 
 setSorting ($sorting)
 
 cloneOption (ilDclSelectionOption $original_option)
 
- 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 flushOptions ($field_id)
 
static getAllForField ($field_id)
 
static getValues ($field_id, $opt_ids)
 
- 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 DB_TABLE_NAME = "il_dcl_sel_opts"
 
- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 

Protected Attributes

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

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

◆ cloneOption()

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

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

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

+ Here is the call graph for this function:

◆ flushOptions()

static ilDclSelectionOption::flushOptions (   $field_id)
static
Parameters
$field_id

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

190 {
191 foreach (self::getAllForField($field_id) as $option) {
192 $option->delete();
193 }
194 }

References $field_id.

Referenced by ilDclSelectionFieldModel\setProperty().

+ Here is the caller graph for this function:

◆ getAllForField()

static ilDclSelectionOption::getAllForField (   $field_id)
static
Parameters
$field_id
Returns
self[]

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

203 {
204 return self::where(array("field_id" => $field_id))->orderBy('sorting')->get();
205 }
static where($where, $operator=null)

References $field_id, and ActiveRecord\where().

Referenced by ilDclSelectionFieldRepresentation\addFilterInputFieldToTable(), ilDclSelectionFieldModel\cloneProperties(), ilDclSelectionFieldModel\doDelete(), ilDclSelectionFieldModel\fillPropertiesForm(), ilDclSelectionFieldModel\getProperty(), and ilDclSelectionFieldModel\reorderExistingValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFieldId()

ilDclSelectionOption::getFieldId ( )
Returns
int

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

97 {
98 return $this->field_id;
99 }

References $field_id.

◆ getId()

ilDclSelectionOption::getId ( )
Returns
int

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

References $id.

◆ getOptId()

ilDclSelectionOption::getOptId ( )
Returns
int

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

115 {
116 return (int) $this->opt_id;
117 }

References $opt_id.

Referenced by cloneOption().

+ Here is the caller graph for this function:

◆ getSorting()

ilDclSelectionOption::getSorting ( )
Returns
int

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

References $sorting.

Referenced by cloneOption().

+ Here is the caller graph for this function:

◆ getValue()

ilDclSelectionOption::getValue ( )
Returns
string

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

References $value.

Referenced by cloneOption().

+ Here is the caller graph for this function:

◆ getValues()

static ilDclSelectionOption::getValues (   $field_id,
  $opt_ids 
)
static

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

208 {
209 $operators = array('field_id' => '=');
210 if (is_array($opt_ids)) {
211 if (empty($opt_ids)) {
212 return array();
213 }
214 $operators['opt_id'] = 'IN';
215 } else {
216 $operators['opt_id'] = '=';
217 }
218 $return = array();
219 foreach (self::where(array("field_id" => $field_id, "opt_id" => $opt_ids), $operators)->orderBy('sorting')->get() as $opt) {
220 $return[] = $opt->getValue();
221 }
222 return $return;
223 }
static orderBy($orderBy, $orderDirection='ASC')

References $field_id, and ActiveRecord\orderBy().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnDbTableName()

static ilDclSelectionOption::returnDbTableName ( )
static
Exceptions

arException

Deprecated:

Reimplemented from ActiveRecord.

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

References DB_TABLE_NAME.

◆ setFieldId()

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

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

106 {
107 $this->field_id = $field_id;
108 }

References $field_id.

◆ setId()

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

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

88 {
89 $this->id = $id;
90 }

References $id.

◆ setOptId()

ilDclSelectionOption::setOptId (   $opt_id)
Parameters
int$opt_id

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

124 {
125 $this->opt_id = $opt_id;
126 }

References $opt_id.

Referenced by cloneOption().

+ Here is the caller graph for this function:

◆ setSorting()

ilDclSelectionOption::setSorting (   $sorting)
Parameters
int$sorting

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

160 {
161 $this->sorting = $sorting;
162 }

References $sorting.

Referenced by cloneOption().

+ Here is the caller graph for this function:

◆ setValue()

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

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

142 {
143 $this->value = $value;
144 }

References $value.

Referenced by cloneOption().

+ Here is the caller graph for this function:

Field Documentation

◆ $field_id

ilDclSelectionOption::$field_id
protected

◆ $id

ilDclSelectionOption::$id
protected

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

Referenced by getId(), and setId().

◆ $opt_id

ilDclSelectionOption::$opt_id
protected

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

Referenced by getOptId(), and setOptId().

◆ $sorting

ilDclSelectionOption::$sorting
protected

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

Referenced by getSorting(), and setSorting().

◆ $value

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 11 of file class.ilDclSelectionOption.php.

Referenced by returnDbTableName().


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