ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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().

230  {
231  $this->setValue($original_option->getValue());
232  $this->setSorting($original_option->getSorting());
233  $this->setOptId($original_option->getOptId());
234  }
+ Here is the call graph for this function:

◆ flushOptions()

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

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

References $field_id.

Referenced by ilDclSelectionFieldModel\setProperty().

188  {
189  foreach (self::getAllForField($field_id) as $option) {
190  $option->delete();
191  }
192  }
+ Here is the caller graph for this function:

◆ getAllForField()

static ilDclSelectionOption::getAllForField (   $field_id)
static

◆ getFieldId()

ilDclSelectionOption::getFieldId ( )
Returns
int

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

References $field_id.

◆ getId()

ilDclSelectionOption::getId ( )
Returns
int

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

References $id.

77  {
78  return $this->id;
79  }

◆ getOptId()

ilDclSelectionOption::getOptId ( )
Returns
int

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

References $opt_id.

Referenced by cloneOption().

113  {
114  return (int) $this->opt_id;
115  }
+ Here is the caller graph for this function:

◆ getSorting()

ilDclSelectionOption::getSorting ( )
Returns
int

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

References $sorting.

Referenced by cloneOption().

149  {
150  return $this->sorting;
151  }
+ Here is the caller graph for this function:

◆ getValue()

ilDclSelectionOption::getValue ( )
Returns
string

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

References $value.

Referenced by cloneOption().

131  {
132  return $this->value;
133  }
+ Here is the caller graph for this function:

◆ getValues()

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

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

References $field_id, and ActiveRecord\orderBy().

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

207  {
208  $operators = array('field_id' => '=');
209  if (is_array($opt_ids)) {
210  if (empty($opt_ids)) {
211  return array();
212  }
213  $operators['opt_id'] = 'IN';
214  } else {
215  $operators['opt_id'] = '=';
216  }
217  $return = array();
218  foreach (self::where(array("field_id" => $field_id, "opt_id" => $opt_ids), $operators)->orderBy('sorting')->get() as $opt) {
219  $return[] = $opt->getValue();
220  }
221 
222  return $return;
223  }
static orderBy($orderBy, $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 14 of file class.ilDclSelectionOption.php.

15  {
16  return self::DB_TABLE_NAME;
17  }

◆ setFieldId()

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

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

References $field_id.

104  {
105  $this->field_id = $field_id;
106  }

◆ setId()

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

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

References $id.

86  {
87  $this->id = $id;
88  }

◆ setOptId()

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

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

References $opt_id.

Referenced by cloneOption().

122  {
123  $this->opt_id = $opt_id;
124  }
+ Here is the caller graph for this function:

◆ setSorting()

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

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

References $field_id, $opt_id, $sorting, and $value.

Referenced by cloneOption().

158  {
159  $this->sorting = $sorting;
160  }
+ Here is the caller graph for this function:

◆ setValue()

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

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

References $value.

Referenced by cloneOption().

140  {
141  $this->value = $value;
142  }
+ Here is the caller graph for this function:

Field Documentation

◆ $field_id

ilDclSelectionOption::$field_id
protected

◆ $id

ilDclSelectionOption::$id
protected

Definition at line 31 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(), setOptId(), and setSorting().

◆ $sorting

ilDclSelectionOption::$sorting
protected

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

Referenced by getSorting(), and setSorting().

◆ $value

ilDclSelectionOption::$value
protected

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

Referenced by getValue(), setSorting(), and setValue().

◆ DB_TABLE_NAME

const ilDclSelectionOption::DB_TABLE_NAME = "il_dcl_sel_opts"

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


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