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

Class ilDclSelectionFieldModel. More...

+ Inheritance diagram for ilDclSelectionFieldModel:
+ Collaboration diagram for ilDclSelectionFieldModel:

Public Member Functions

 getValidFieldProperties ()
 @inheritDoc More...
 
 getRecordQueryFilterObject ($filter_value="", ilDclBaseFieldModel $sort_field=null)
 Returns a query-object for building the record-loader-sql-query. More...
 
 isMulti ()
 
 storePropertiesFromForm (ilPropertyFormGUI $form)
 called when saving the 'edit field' form More...
 
 fillPropertiesForm (ilPropertyFormGUI &$form)
 
 setProperty ($key, $value)
 
 reorderExistingValues ()
 sorts record field values by the new order More...
 
 getProperty ($key)
 
 getRecordQuerySortObject ($direction="asc", $sort_by_status=false)
 
 cloneProperties (ilDclBaseFieldModel $originalField)
 
 doDelete ()
 Remove field and properties. More...
 
 isConfirmationRequired (ilPropertyFormGUI $form)
 called by ilDclFieldEditGUI when updating field properties if you overwrite this method, remember to also overwrite getConfirmationGUI
Parameters
ilPropertyFormGUI$form
Returns
bool
More...
 
 getConfirmationGUI (ilPropertyFormGUI $form)
 called by ilDclFieldEditGUI if isConfirmationRequired returns true
Parameters
ilPropertyFormGUI$form
Returns
ilConfirmationGUI
More...
 
- Public Member Functions inherited from ilDclBaseFieldModel
 __construct ($a_id=0)
 
 setId ($a_id)
 Set field id. More...
 
 getId ()
 Get field id. More...
 
 setTableId ($a_id)
 Set table id. More...
 
 getTableId ()
 Get table id. More...
 
 setTitle ($a_title)
 Set title. More...
 
 getTitle ()
 Get title. More...
 
 setDescription ($a_desc)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setDatatypeId ($a_id)
 Set datatype id. More...
 
 getDatatypeId ()
 Get datatype_id. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required Required. More...
 
 isUnique ()
 
 setUnique ($unique)
 
 getDatatype ()
 
 getDatatypeTitle ()
 
 getStorageLocation ()
 Get storage location for the model. More...
 
 getExportable ()
 
 toArray ()
 
 isStandardField ()
 
 doRead ()
 Read field. More...
 
 buildFromDBRecord ($rec)
 Builds model from db record. More...
 
 doCreate ()
 Create new field. More...
 
 doUpdate ()
 Update field. More...
 
 updateProperties ()
 Update properties of this field in Database. More...
 
 doDelete ()
 Remove field and properties. More...
 
 getFieldSettings ()
 
 getOrder ()
 
 setOrder ($order)
 
 hasProperty ($key)
 Checks if a certain property for a field is set. More...
 
 getProperty ($key)
 Returns a certain property of a field. More...
 
 getPropertyInstance ($key)
 Return ActiveRecord of property. More...
 
 setProperty ($key, $value)
 Set a property for a field (does not save) More...
 
 getValidFieldProperties ()
 Returns all valid properties for a field-type. More...
 
 setLocked ($locked)
 
 getLocked ()
 
 checkValidityFromForm (ilPropertyFormGUI &$form, $record_id=null)
 
 checkValidity ($value, $record_id=null)
 Check if input is valid. More...
 
 cloneStructure ($original_id)
 
 afterClone ($records)
 
 cloneProperties (ilDclBaseFieldModel $originalField)
 
 setExportable ($exportable)
 
 allowFilterInListView ()
 
 getRecordQuerySortObject ($direction="asc", $sort_by_status=false)
 Returns a query-object for building the record-loader-sql-query. More...
 
 getRecordQueryFilterObject ($filter_value="", ilDclBaseFieldModel $sort_field=null)
 Returns a query-object for building the record-loader-sql-query. More...
 
 getSortField ()
 Returns the sort-field id. More...
 
 hasNumericSorting ()
 Set to true, when the sorting should be handled numerical. More...
 
 checkFieldCreationInput (ilPropertyFormGUI $form)
 Checks input of specific fields befor saving. More...
 
 getStorageLocationOverride ()
 
 setStorageLocationOverride ($storage_location_override)
 
 fillHeaderExcel (ilExcel $worksheet, &$row, &$col)
 
 checkTitlesForImport (array &$titles, array &$import_fields)
 
 storePropertiesFromForm (ilPropertyFormGUI $form)
 called when saving the 'edit field' form More...
 
 fillPropertiesForm (ilPropertyFormGUI &$form)
 called to fill the 'edit field' form More...
 
 isConfirmationRequired (ilPropertyFormGUI $form)
 called by ilDclFieldEditGUI when updating field properties if you overwrite this method, remember to also overwrite getConfirmationGUI More...
 
 getConfirmationGUI (ilPropertyFormGUI $form)
 called by ilDclFieldEditGUI if isConfirmationRequired returns true More...
 

Data Fields

const SELECTION_TYPE_SINGLE = 'selection_type_single'
 
const SELECTION_TYPE_MULTI = 'selection_type_multi'
 
const SELECTION_TYPE_COMBOBOX = 'selection_type_combobox'
 
const PROP_SELECTION_TYPE = ''
 
const PROP_SELECTION_OPTIONS = ''
 
- Data Fields inherited from ilDclBaseFieldModel
const PROP_LENGTH = "lenght"
 General properties. More...
 
const PROP_REGEX = "regex"
 
const PROP_REFERENCE = "table_id"
 
const PROP_URL = "url"
 
const PROP_TEXTAREA = "text_area"
 
const PROP_REFERENCE_LINK = "reference_link"
 
const PROP_WIDTH = "width"
 
const PROP_HEIGHT = "height"
 
const PROP_LEARNING_PROGRESS = "learning_progress"
 
const PROP_ILIAS_REFERENCE_LINK = "ILIAS_reference_link"
 
const PROP_N_REFERENCE = "multiple_selection"
 
const PROP_FORMULA_EXPRESSION = "expression"
 
const PROP_DISPLAY_COPY_LINK_ACTION_MENU = "display_action_menu"
 
const PROP_LINK_DETAIL_PAGE_TEXT = "link_detail_page"
 
const PROP_SUPPORTED_FILE_TYPES = "supported_file_types"
 
const PROP_PLUGIN_HOOK_NAME = "plugin_hook_name"
 
const PROP_TEXT_SELECTION_OPTIONS = "text_selection_options"
 
const PROP_TEXT_SELECTION_TYPE = "text_selection_type"
 
const PROP_DATE_SELECTION_OPTIONS = "date_selection_options"
 
const PROP_DATE_SELECTION_TYPE = "date_selection_type"
 
const EDIT_VIEW = 2
 
const EXPORTABLE_VIEW = 4
 

Protected Member Functions

 multiPropertyChanged ($is_multi_now)
 changes the values of all record fields, since the property "multi" has changed More...
 
- Protected Member Functions inherited from ilDclBaseFieldModel
 loadDatatype ()
 Load datatype for model. More...
 
 loadTableFieldSetting ()
 loadTableFieldSetting More...
 
 addToTableViews ()
 create ilDclTableViewFieldSettings for this field in each tableview More...
 
 updateTableFieldSetting ()
 update exportable and fieldorder More...
 
 loadProperties ()
 Get all properties of a field. More...
 
 normalizeValue ($value)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilDclBaseFieldModel
static _getTitleInvalidChars ($a_as_regex=true)
 All valid chars for filed titles. More...
 
static _getFieldIdByTitle ($title, $table_id)
 
- Protected Attributes inherited from ilDclBaseFieldModel
 $id
 
 $table_id
 
 $title
 
 $description
 
 $datatypeId
 
 $required
 
 $order
 
 $unique
 
 $locked
 
 $property = array()
 
 $exportable
 
 $datatype
 
 $storage_location_override = null
 

Detailed Description

Member Function Documentation

◆ cloneProperties()

ilDclSelectionFieldModel::cloneProperties ( ilDclBaseFieldModel  $originalField)
Parameters
ilDclBaseFieldModel$originalField

Reimplemented from ilDclBaseFieldModel.

Definition at line 274 of file class.ilDclSelectionFieldModel.php.

275 {
276 parent::cloneProperties($originalField);
278 foreach ($options as $opt) {
279 $new_opt = new ilDclSelectionOption();
280 $new_opt->cloneOption($opt);
281 $new_opt->setFieldId($this->getId());
282 $new_opt->store();
283 }
284 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
Class ilDclSelectionOption.

References $options, ilDclSelectionOption\getAllForField(), and ilDclBaseFieldModel\getId().

+ Here is the call graph for this function:

◆ doDelete()

ilDclSelectionFieldModel::doDelete ( )

Remove field and properties.

Reimplemented from ilDclBaseFieldModel.

Definition at line 290 of file class.ilDclSelectionFieldModel.php.

291 {
292 foreach (ilDclSelectionOption::getAllForField($this->getId()) as $option) {
293 $option->delete();
294 }
295 parent::doDelete();
296 }

References ilDclSelectionOption\getAllForField(), and ilDclBaseFieldModel\getId().

+ Here is the call graph for this function:

◆ fillPropertiesForm()

ilDclSelectionFieldModel::fillPropertiesForm ( ilPropertyFormGUI $form)
Parameters
ilPropertyFormGUI$form
Returns
bool

Reimplemented from ilDclBaseFieldModel.

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

104 {
105 $values = array(
106 'table_id' => $this->getTableId(),
107 'field_id' => $this->getId(),
108 'title' => $this->getTitle(),
109 'datatype' => $this->getDatatypeId(),
110 'description' => $this->getDescription(),
111 'required' => $this->getRequired(),
112 'unique' => $this->isUnique(),
113 );
114
115 $properties = $this->getValidFieldProperties();
116 foreach ($properties as $prop) {
117 if ($prop == static::PROP_SELECTION_OPTIONS) {
119 $prop_values = array();
120 foreach ($options as $option) {
121 // the 'selection_value' is for a correct input
122 $prop_values[$option->getOptId()] = array('selection_value' => $option->getValue());
123 }
124
125 $values['prop_' . $prop] = $prop_values;
126 } else {
127 $values['prop_' . $prop] = $this->getProperty($prop);
128 }
129 }
130
131 $form->setValuesByArray($values);
132
133 return true;
134 }
getRequired()
Get Required Required.
if(isset($_POST['submit'])) $form

References $form, $options, ilDclSelectionOption\getAllForField(), ilDclBaseFieldModel\getDatatypeId(), ilDclBaseFieldModel\getDescription(), ilDclBaseFieldModel\getId(), getProperty(), ilDclBaseFieldModel\getRequired(), ilDclBaseFieldModel\getTableId(), ilDclBaseFieldModel\getTitle(), getValidFieldProperties(), and ilDclBaseFieldModel\isUnique().

+ Here is the call graph for this function:

◆ getConfirmationGUI()

ilDclSelectionFieldModel::getConfirmationGUI ( ilPropertyFormGUI  $form)

called by ilDclFieldEditGUI if isConfirmationRequired returns true

Parameters
ilPropertyFormGUI$form
Returns
ilConfirmationGUI

Reimplemented from ilDclBaseFieldModel.

Definition at line 312 of file class.ilDclSelectionFieldModel.php.

313 {
314 global $DIC;
316 $prop_selection_options = $representation->getPropertyInputFieldId(static::PROP_SELECTION_OPTIONS);
317 $prop_selection_type = $representation->getPropertyInputFieldId(static::PROP_SELECTION_TYPE);
318
319 $ilConfirmationGUI = parent::getConfirmationGUI($form);
320 $ilConfirmationGUI->setHeaderText($DIC->language()->txt('dcl_msg_mc_to_sc_confirmation'));
321 $ilConfirmationGUI->addHiddenItem($prop_selection_type, $form->getInput($prop_selection_type));
322 foreach ($form->getInput($prop_selection_options) as $key => $option) {
323 $ilConfirmationGUI->addHiddenItem($prop_selection_options . "[$key][selection_value]", $option['selection_value']);
324 }
325 return $ilConfirmationGUI;
326 }
static getFieldRepresentationInstance(ilDclBaseFieldModel $field)
Returns FieldRepresentation from BaseFieldModel.
$key
Definition: croninfo.php:18
global $DIC
Definition: saml.php:7

References $DIC, $form, $key, and ilDclFieldFactory\getFieldRepresentationInstance().

+ Here is the call graph for this function:

◆ getProperty()

ilDclSelectionFieldModel::getProperty (   $key)
Parameters
$key
Returns
ilDclSelectionOption[]|null

Reimplemented from ilDclBaseFieldModel.

Definition at line 224 of file class.ilDclSelectionFieldModel.php.

225 {
226 switch ($key) {
227 case static::PROP_SELECTION_OPTIONS:
229 break;
230 default:
231 return parent::getProperty($key);
232 }
233 }

References $key, ilDclSelectionOption\getAllForField(), and ilDclBaseFieldModel\getId().

Referenced by fillPropertiesForm(), isMulti(), and setProperty().

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

◆ getRecordQueryFilterObject()

ilDclSelectionFieldModel::getRecordQueryFilterObject (   $filter_value = "",
ilDclBaseFieldModel  $sort_field = null 
)

Returns a query-object for building the record-loader-sql-query.

Parameters
string$filter_value
Returns
null|ilDclRecordQueryObject

Reimplemented from ilDclBaseFieldModel.

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

34 {
35 global $DIC;
36 $ilDB = $DIC['ilDB'];
37
38 $join_str =
39 " INNER JOIN il_dcl_record_field AS filter_record_field_{$this->getId()} ON (filter_record_field_{$this->getId()}.record_id = record.id AND filter_record_field_{$this->getId()}.field_id = "
40 . $ilDB->quote($this->getId(), 'integer') . ") ";
41
42 if ($this->isMulti()) {
43 $join_str .= " INNER JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS filter_stloc_{$this->getId()} ON (filter_stloc_{$this->getId()}.record_field_id = filter_record_field_{$this->getId()}.id AND (" .
44 "filter_stloc_{$this->getId()}.value = " . $ilDB->quote("[$filter_value]", 'text') . " OR " .
45 "filter_stloc_{$this->getId()}.value LIKE " . $ilDB->quote("%\"$filter_value\"%", 'text') . " OR " .
46 "filter_stloc_{$this->getId()}.value LIKE " . $ilDB->quote("%,$filter_value,%", 'text') . " OR " .
47 "filter_stloc_{$this->getId()}.value LIKE " . $ilDB->quote("%[$filter_value,%", 'text') . " OR " .
48 "filter_stloc_{$this->getId()}.value LIKE " . $ilDB->quote("%,$filter_value]%", 'text') .
49 ")) ";
50 } else {
51 $join_str .=
52 " INNER JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS filter_stloc_{$this->getId()} ON (filter_stloc_{$this->getId()}.record_field_id = filter_record_field_{$this->getId()}.id AND filter_stloc_{$this->getId()}.value = "
53 . $ilDB->quote($filter_value, 'integer') . ") ";
54 }
55
56 $sql_obj = new ilDclRecordQueryObject();
57 $sql_obj->setJoinStatement($join_str);
58
59 return $sql_obj;
60 }
Class ilDclRecordQueryObject.
global $ilDB

References $DIC, $ilDB, ilDclBaseFieldModel\getId(), and isMulti().

+ Here is the call graph for this function:

◆ getRecordQuerySortObject()

ilDclSelectionFieldModel::getRecordQuerySortObject (   $direction = "asc",
  $sort_by_status = false 
)
Parameters
string$direction
bool$sort_by_status
Returns
ilDclRecordQueryObject

Reimplemented from ilDclBaseFieldModel.

Definition at line 242 of file class.ilDclSelectionFieldModel.php.

243 {
244 global $DIC;
245 $ilDB = $DIC['ilDB'];
246
247 if ($this->isMulti()) {
248 return null;
249 }
250
251 $sql_obj = new ilDclRecordQueryObject();
252
253 $select_str = "sel_opts_{$this->getId()}.value AS field_{$this->getId()}";
254 $join_str = "LEFT JOIN il_dcl_record_field AS sort_record_field_{$this->getId()} ON (sort_record_field_{$this->getId()}.record_id = record.id AND sort_record_field_{$this->getId()}.field_id = "
255 . $ilDB->quote($this->getId(), 'integer') . ") ";
256 $join_str .= "LEFT JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS sort_stloc_{$this->getId()} ON (sort_stloc_{$this->getId()}.record_field_id = sort_record_field_{$this->getId()}.id) ";
257 //if ($this->isMulti()) {
258 // $join_str .= "LEFT JOIN il_dcl_sel_opts as sel_opts_{$this->getId()} ON (sel_opts_{$this->getId()}.opt_id = sort_stloc_{$this->getId()}.value->'$[0]' AND sel_opts_{$this->getId()}.field_id = " . $ilDB->quote($this->getId(), 'integer') . ") ";
259 //} else {
260 $join_str .= "LEFT JOIN il_dcl_sel_opts as sel_opts_{$this->getId()} ON (sel_opts_{$this->getId()}.opt_id = sort_stloc_{$this->getId()}.value AND sel_opts_{$this->getId()}.field_id = " . $ilDB->quote($this->getId(), 'integer') . ") ";
261 //}
262
263
264
265 $sql_obj->setSelectStatement($select_str);
266 $sql_obj->setJoinStatement($join_str);
267 $sql_obj->setOrderStatement("field_{$this->getId()} {$direction}");
268
269
270 return $sql_obj;
271 }

References $DIC, $ilDB, ilDclBaseFieldModel\getId(), and isMulti().

+ Here is the call graph for this function:

◆ getValidFieldProperties()

ilDclSelectionFieldModel::getValidFieldProperties ( )

@inheritDoc

Reimplemented from ilDclBaseFieldModel.

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

22 {
23 return array(static::PROP_SELECTION_OPTIONS, static::PROP_SELECTION_TYPE);
24 }

Referenced by fillPropertiesForm(), and storePropertiesFromForm().

+ Here is the caller graph for this function:

◆ isConfirmationRequired()

ilDclSelectionFieldModel::isConfirmationRequired ( ilPropertyFormGUI  $form)

called by ilDclFieldEditGUI when updating field properties if you overwrite this method, remember to also overwrite getConfirmationGUI

Parameters
ilPropertyFormGUI$form
Returns
bool

Reimplemented from ilDclBaseFieldModel.

Definition at line 302 of file class.ilDclSelectionFieldModel.php.

303 {
304 $will_be_multi = ($form->getInput('prop_' . static::PROP_SELECTION_TYPE) == self::SELECTION_TYPE_MULTI);
305 return $this->isMulti() && !$will_be_multi;
306 }

References $form, isMulti(), and SELECTION_TYPE_MULTI.

+ Here is the call graph for this function:

◆ isMulti()

ilDclSelectionFieldModel::isMulti ( )

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

63 {
64 return ($this->getProperty(static::PROP_SELECTION_TYPE) == self::SELECTION_TYPE_MULTI);
65 }

References getProperty().

Referenced by getRecordQueryFilterObject(), getRecordQuerySortObject(), isConfirmationRequired(), and setProperty().

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

◆ multiPropertyChanged()

ilDclSelectionFieldModel::multiPropertyChanged (   $is_multi_now)
protected

changes the values of all record fields, since the property "multi" has changed

Parameters
$is_multi_now

Definition at line 203 of file class.ilDclSelectionFieldModel.php.

204 {
205 foreach (ilDclCache::getTableCache($this->getTableId())->getRecords() as $record) {
206 $record_field = $record->getRecordField($this->getId());
207 $record_field_value = $record_field->getValue();
208
209 if ($record_field_value && !is_array($record_field_value) && $is_multi_now) {
210 $record_field->setValue(array($record_field_value));
211 $record_field->doUpdate();
212 } elseif (is_array($record_field_value) && !$is_multi_now) {
213 $record_field->setValue(array_shift($record_field_value));
214 $record_field->doUpdate();
215 }
216 }
217 }
static getTableCache($table_id=0)

References ilDclBaseFieldModel\getId(), ilDclCache\getTableCache(), and ilDclBaseFieldModel\getTableId().

Referenced by setProperty().

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

◆ reorderExistingValues()

ilDclSelectionFieldModel::reorderExistingValues ( )

sorts record field values by the new order

Definition at line 175 of file class.ilDclSelectionFieldModel.php.

176 {
178 // loop each record(-field)
179 foreach (ilDclCache::getTableCache($this->getTableId())->getRecords() as $record) {
180 $record_field = $record->getRecordField($this->getId());
181 $record_field_value = $record_field->getValue();
182
183 if (is_array($record_field_value) && count($record_field_value) > 1) {
184 $sorted_array = array();
185 // $options has the right order, so loop those
186 foreach ($options as $option) {
187 if (in_array($option->getOptId(), $record_field_value)) {
188 $sorted_array[] = $option->getOptId();
189 }
190 }
191 $record_field->setValue($sorted_array);
192 $record_field->doUpdate();
193 }
194 }
195 }

References $options, ilDclSelectionOption\getAllForField(), ilDclBaseFieldModel\getId(), ilDclCache\getTableCache(), and ilDclBaseFieldModel\getTableId().

Referenced by setProperty().

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

◆ setProperty()

ilDclSelectionFieldModel::setProperty (   $key,
  $value 
)
Parameters
$key
$value

Reimplemented from ilDclBaseFieldModel.

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

142 {
143 $is_update = $this->getProperty($key);
144 switch ($key) {
145 case static::PROP_SELECTION_OPTIONS:
146
148 $sorting = 1;
149 foreach ($value as $id => $val) {
150 ilDclSelectionOption::storeOption($this->getId(), $id, $sorting, $val);
151 $sorting++;
152 }
153 // if the field is not being created reorder the options in the existing record fields
154 if ($is_update) {
155 $this->reorderExistingValues();
156 }
157 break;
158 case static::PROP_SELECTION_TYPE:
159 $will_be_multi = ($value == self::SELECTION_TYPE_MULTI);
160 // if the "Multi" property has changed, adjust the record field values
161 if ($is_update && ($this->isMulti() && !$will_be_multi || !$this->isMulti() && $will_be_multi)) {
162 $this->multiPropertyChanged($will_be_multi);
163 }
164 parent::setProperty($key, $value)->store();
165 break;
166 default:
167 parent::setProperty($key, $value)->store();
168 }
169 }
reorderExistingValues()
sorts record field values by the new order
multiPropertyChanged($is_multi_now)
changes the values of all record fields, since the property "multi" has changed

References ilDclBaseFieldModel\$id, $key, ilDclSelectionOption\flushOptions(), ilDclBaseFieldModel\getId(), getProperty(), isMulti(), multiPropertyChanged(), reorderExistingValues(), and SELECTION_TYPE_MULTI.

Referenced by storePropertiesFromForm().

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

◆ storePropertiesFromForm()

ilDclSelectionFieldModel::storePropertiesFromForm ( ilPropertyFormGUI  $form)

called when saving the 'edit field' form

Parameters
ilPropertyFormGUI$form

Reimplemented from ilDclBaseFieldModel.

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

73 {
75
76 $field_props = $this->getValidFieldProperties();
77 foreach ($field_props as $property) {
78 $value = $form->getInput($representation->getPropertyInputFieldId($property));
79
80 // break down the multidimensional array from the multi input
81 // e.g.: { [0] => { [0] => 'x' }, [1] => { [1] => 'y' } } TO { [0] => 'x', [1] => 'y' }
82 if (is_array($value)) {
83 foreach ($value as $k => $v) {
84 if (is_array($v)) {
85 $value[$k] = array_shift($v);
86 }
87 }
88 }
89
90 // save non empty values and set them to null, when they already exist. Do not override plugin-hook when already set.
91 if (!empty($value) || ($this->getPropertyInstance($property) != null && $property != self::PROP_PLUGIN_HOOK_NAME)) {
92 $this->setProperty($property, $value);
93 }
94 }
95 }
getPropertyInstance($key)
Return ActiveRecord of property.

References $form, ilDclBaseFieldModel\$property, ilDclFieldFactory\getFieldRepresentationInstance(), ilDclBaseFieldModel\getPropertyInstance(), getValidFieldProperties(), and setProperty().

+ Here is the call graph for this function:

Field Documentation

◆ PROP_SELECTION_OPTIONS

const ilDclSelectionFieldModel::PROP_SELECTION_OPTIONS = ''

Definition at line 16 of file class.ilDclSelectionFieldModel.php.

◆ PROP_SELECTION_TYPE

const ilDclSelectionFieldModel::PROP_SELECTION_TYPE = ''

Definition at line 15 of file class.ilDclSelectionFieldModel.php.

◆ SELECTION_TYPE_COMBOBOX

const ilDclSelectionFieldModel::SELECTION_TYPE_COMBOBOX = 'selection_type_combobox'

◆ SELECTION_TYPE_MULTI

const ilDclSelectionFieldModel::SELECTION_TYPE_MULTI = 'selection_type_multi'

◆ SELECTION_TYPE_SINGLE

const ilDclSelectionFieldModel::SELECTION_TYPE_SINGLE = 'selection_type_single'

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