ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclBaseFieldModel 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 ilDclBaseFieldModel:
+ Collaboration diagram for ilDclBaseFieldModel:

Public Member Functions

 __construct (int $a_id=0)
 
 setId ($a_id)
 Set field id. More...
 
 getId ()
 Get field id. More...
 
 setTableId (int $a_id)
 Set table id. More...
 
 getTableId ()
 Get table id. More...
 
 setTitle (string $a_title)
 Set title. More...
 
 getTitle ()
 Get title. More...
 
 setDescription (string $a_desc)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setDatatypeId (int $a_id)
 Set datatype id. More...
 
 getDatatypeId ()
 Get datatype_id. More...
 
 isUnique ()
 
 setUnique (?bool $unique)
 
 getDatatype ()
 
 getDatatypeTitle ()
 
 getPresentationTitle ()
 
 getPresentationDescription ()
 
 getStorageLocation ()
 Get storage location for the model. More...
 
 getExportable ()
 
 toArray ()
 
 isStandardField ()
 
 doRead ()
 
 buildFromDBRecord (array $rec)
 Builds model from db record. More...
 
 doCreate ()
 
 doUpdate ()
 
 updateProperties ()
 Update properties of this field in Database. More...
 
 doDelete ()
 Remove field and properties. More...
 
 getViewSettings ()
 
 getViewSetting (int $tableview_id)
 
 getOrder ()
 
 setOrder (string $order)
 
 hasProperty (string $key)
 Checks if a certain property for a field is set. More...
 
 getProperty (string $key)
 Returns a certain property of a field. More...
 
 getPropertyInstance (string $key)
 Return ActiveRecord of property. More...
 
 setProperty (string $key, $value)
 Set a property for a field (does not save) More...
 
 getValidFieldProperties ()
 Returns all valid properties for a field-type. More...
 
 checkValidityFromForm (ilPropertyFormGUI &$form, ?int $record_id=null)
 
 checkValidity ($value, ?int $record_id=null)
 Check if input is valid. More...
 
 cloneStructure (int $original_id)
 
 afterClone (array $records)
 
 cloneProperties (ilDclBaseFieldModel $originalField)
 
 setExportable (bool $exportable)
 
 allowFilterInListView ()
 
 getRecordQuerySortObject (string $direction="asc", bool $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 (?int $storage_location_override)
 
 fillHeaderExcel (ilExcel $worksheet, int &$row, int &$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...
 

Static Public Member Functions

static _getTitleInvalidChars (bool $a_as_regex=true)
 All valid chars for filed titles. More...
 
static _getFieldIdByTitle (string $title, int $table_id)
 

Data Fields

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_text"
 
const PROP_LINK_DETAIL_PAGE_MOB = "link_detail_page_mob"
 
const PROP_SUPPORTED_FILE_TYPES = "supported_file_types"
 
const PROP_PLUGIN_HOOK_NAME = "plugin_hook_name"
 
const EDIT_VIEW = 2
 
const EXPORTABLE_VIEW = 4
 

Protected Member Functions

 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)
 

Protected Attributes

string $id = ""
 
int $table_id = 0
 
string $title = ""
 
string $description = ""
 
int $datatypeId = 0
 
int $order = null
 
bool $unique = false
 
array $property = []
 
bool $exportable = false
 
ilDclDatatype $datatype = null
 
int $storage_location_override = null
 With this property the datatype-storage-location can be overwritten. More...
 
ilDBInterface $db
 
ilLanguage $lng
 

Private Member Functions

 loadExportability ()
 Load exportability. More...
 

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.ilDclBaseFieldModel.php.

Constructor & Destructor Documentation

◆ __construct()

ilDclBaseFieldModel::__construct ( int  $a_id = 0)

Definition at line 63 of file class.ilDclBaseFieldModel.php.

References $DIC, doRead(), and ILIAS\Repository\lng().

64  {
65  global $DIC;
66  $this->db = $DIC->database();
67  $this->lng = $DIC->language();
68 
69  if ($a_id != 0) {
70  $this->id = $a_id;
71  $this->doRead();
72  }
73  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ _getFieldIdByTitle()

static ilDclBaseFieldModel::_getFieldIdByTitle ( string  $title,
int  $table_id 
)
static

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

References $DIC, $id, and $ilDB.

87  : int
88  {
89  global $DIC;
90  $ilDB = $DIC['ilDB'];
91  $result = $ilDB->query(
92  'SELECT id FROM il_dcl_field WHERE title = ' . $ilDB->quote($title, 'text') . ' AND table_id = '
93  . $ilDB->quote($table_id, 'integer')
94  );
95  $id = 0;
96  while ($rec = $ilDB->fetchAssoc($result)) {
97  $id = $rec['id'];
98  }
99 
100  return $id;
101  }
global $DIC
Definition: feed.php:28

◆ _getTitleInvalidChars()

static ilDclBaseFieldModel::_getTitleInvalidChars ( bool  $a_as_regex = true)
static

All valid chars for filed titles.

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

Referenced by ilDclFieldEditGUI\initForm().

78  : string
79  {
80  if ($a_as_regex) {
81  return '/^[^<>\\\\":]*$/i';
82  } else {
83  return '\ < > " :';
84  }
85  }
+ Here is the caller graph for this function:

◆ addToTableViews()

ilDclBaseFieldModel::addToTableViews ( )
protected

create ilDclTableViewFieldSettings for this field in each tableview

Definition at line 357 of file class.ilDclBaseFieldModel.php.

References ilDclTableView\getAllForTableId().

Referenced by doCreate().

357  : void
358  {
359  foreach (ilDclTableView::getAllForTableId($this->table_id) as $tableview) {
360  $tableview->createFieldSetting($this->id);
361  }
362  }
static getAllForTableId(int $table_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterClone()

ilDclBaseFieldModel::afterClone ( array  $records)

Definition at line 610 of file class.ilDclBaseFieldModel.php.

References ilDclCache\getRecordFieldCache().

Referenced by ilDclReferenceFieldModel\getFieldRef().

611  {
612  foreach ($records as $rec) {
613  ilDclCache::getRecordFieldCache($rec, $this)->afterClone();
614  }
615  }
static getRecordFieldCache(object $record, object $field)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allowFilterInListView()

ilDclBaseFieldModel::allowFilterInListView ( )

Definition at line 647 of file class.ilDclBaseFieldModel.php.

647  : bool
648  {
649  return true;
650  }

◆ buildFromDBRecord()

ilDclBaseFieldModel::buildFromDBRecord ( array  $rec)

Builds model from db record.

Definition at line 319 of file class.ilDclBaseFieldModel.php.

References setDatatypeId(), setDescription(), setId(), setTableId(), setTitle(), and setUnique().

319  : void
320  {
321  $this->setId($rec["id"]);
322  $this->setTableId($rec["table_id"]);
323  $this->setTitle($rec["title"]);
324  $this->setDescription($rec["description"]);
325  $this->setDatatypeId($rec["datatype_id"]);
326  $this->setUnique($rec["is_unique"] ?? null);
327  }
setDatatypeId(int $a_id)
Set datatype id.
setTitle(string $a_title)
Set title.
setDescription(string $a_desc)
Set description.
setTableId(int $a_id)
Set table id.
+ Here is the call graph for this function:

◆ checkFieldCreationInput()

ilDclBaseFieldModel::checkFieldCreationInput ( ilPropertyFormGUI  $form)

Checks input of specific fields befor saving.

Parameters
ilPropertyFormGUI$form
Returns
bool if checkInput was successful

Definition at line 714 of file class.ilDclBaseFieldModel.php.

714  : bool
715  {
716  return true;
717  }

◆ checkTitlesForImport()

ilDclBaseFieldModel::checkTitlesForImport ( array &  $titles,
array &  $import_fields 
)

Definition at line 741 of file class.ilDclBaseFieldModel.php.

References getTitle(), and ilStr\isUtf8().

741  : void
742  {
743  foreach ($titles as $k => $title) {
744  if (!ilStr::isUtf8($title)) {
745  $title = utf8_encode($title);
746  }
747  if ($title == $this->getTitle()) {
748  $import_fields[$k] = $this;
749  }
750  }
751  }
static isUtf8(string $a_str)
Check whether string is utf-8.
+ Here is the call graph for this function:

◆ checkValidity()

ilDclBaseFieldModel::checkValidity (   $value,
?int  $record_id = null 
)

Check if input is valid.

Parameters
float | int | string | array | null$value
Exceptions
ilDclInputException

Definition at line 560 of file class.ilDclBaseFieldModel.php.

References ilDclCache\getTableCache(), getTableId(), isUnique(), normalizeValue(), and ilDclInputException\UNIQUE_EXCEPTION.

Referenced by checkValidityFromForm().

560  : bool
561  {
562  //Don't check empty values
563  if ($value == null) {
564  return true;
565  }
566 
567  if ($this->isUnique()) {
568  $table = ilDclCache::getTableCache($this->getTableId());
569  foreach ($table->getRecords() as $record) {
570  if ($this->normalizeValue($record->getRecordFieldValue($this->getId())) == $this->normalizeValue($value) && ($record->getId() != $record_id || $record_id == 0)) {
572  }
573  }
574  }
575 
576  return true;
577  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getTableCache(int $table_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkValidityFromForm()

ilDclBaseFieldModel::checkValidityFromForm ( ilPropertyFormGUI $form,
?int  $record_id = null 
)

Definition at line 549 of file class.ilDclBaseFieldModel.php.

References checkValidity(), getId(), and ilPropertyFormGUI\getInput().

549  : void
550  {
551  $value = $form->getInput('field_' . $this->getId());
552  $this->checkValidity($value, $record_id);
553  }
checkValidity($value, ?int $record_id=null)
Check if input is valid.
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
+ Here is the call graph for this function:

◆ cloneProperties()

ilDclBaseFieldModel::cloneProperties ( ilDclBaseFieldModel  $originalField)

Definition at line 617 of file class.ilDclBaseFieldModel.php.

References getDatatypeId(), getId(), getProperty(), getValidFieldProperties(), ilDclDatatype\INPUTFORMAT_REFERENCE, and PROP_REFERENCE.

Referenced by cloneStructure().

617  : void
618  {
619  $orgProps = $originalField->getValidFieldProperties();
620  if (count($orgProps) == 0) {
621  return;
622  }
623  foreach ($orgProps as $prop_name) {
624  $fieldprop_obj = new ilDclFieldProperty();
625  $fieldprop_obj->setFieldId($this->getId());
626  $fieldprop_obj->setName($prop_name);
627 
628  $value = $originalField->getProperty($prop_name);
629 
630  // If reference field, we must reset the referenced field, otherwise it will point to the old ID
632  $value = null;
633  }
634 
635  if ($value) {
636  $fieldprop_obj->setValue($value);
637  $fieldprop_obj->create();
638  }
639  }
640  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getProperty(string $key)
Returns a certain property of a field.
getValidFieldProperties()
Returns all valid properties for a field-type.
getDatatypeId()
Get datatype_id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneStructure()

ilDclBaseFieldModel::cloneStructure ( int  $original_id)
Exceptions
ilException

Definition at line 594 of file class.ilDclBaseFieldModel.php.

References cloneProperties(), doCreate(), ilDclCache\getFieldCache(), getId(), ilDclCache\setCloneOf(), setDatatypeId(), setDescription(), setExportable(), setOrder(), setTitle(), setUnique(), and ilDclCache\TYPE_FIELD.

594  : void
595  {
596  $original = ilDclCache::getFieldCache($original_id);
597  $this->setTitle($original->getTitle());
598  $this->setDatatypeId($original->getDatatypeId());
599  $this->setDescription($original->getDescription());
600  $this->setOrder($original->getOrder());
601  $this->setUnique($original->isUnique());
602  $this->setExportable($original->getExportable());
603  $this->doCreate();
604  $this->cloneProperties($original);
605 
606  // mandatory for all cloning functions
607  ilDclCache::setCloneOf($original_id, $this->getId(), ilDclCache::TYPE_FIELD);
608  }
static getFieldCache(int $field_id=0)
setDatatypeId(int $a_id)
Set datatype id.
cloneProperties(ilDclBaseFieldModel $originalField)
static setCloneOf(int $old, int $new, string $type)
setTitle(string $a_title)
Set title.
setDescription(string $a_desc)
Set description.
+ Here is the call graph for this function:

◆ doCreate()

ilDclBaseFieldModel::doCreate ( )

Definition at line 329 of file class.ilDclBaseFieldModel.php.

References $DIC, $ilDB, $query, ilDclTable\_tableExists(), addToTableViews(), getDatatypeId(), getDescription(), getId(), getTableId(), getTitle(), isUnique(), setId(), and updateTableFieldSetting().

Referenced by cloneStructure().

329  : void
330  {
331  global $DIC;
332  $ilDB = $DIC['ilDB'];
333 
334  if (!ilDclTable::_tableExists($this->getTableId())) {
335  throw new ilException("The field does not have a related table!");
336  }
337 
338  $id = $ilDB->nextId("il_dcl_field");
339  $this->setId($id);
340  $query = "INSERT INTO il_dcl_field (" . "id" . ", table_id" . ", datatype_id" . ", title" . ", description" . ", is_unique"
341  . " ) VALUES (" . $ilDB->quote($this->getId(), "integer") . "," . $ilDB->quote(
342  $this->getTableId(),
343  "integer"
344  ) . ","
345  . $ilDB->quote($this->getDatatypeId(), "integer") . "," . $ilDB->quote($this->getTitle(), "text") . ","
346  . $ilDB->quote($this->getDescription(), "text") . "," . $ilDB->quote($this->isUnique(), "integer") . ")";
347  $ilDB->manipulate($query);
348 
349  $this->updateTableFieldSetting();
350 
351  $this->addToTableViews();
352  }
addToTableViews()
create ilDclTableViewFieldSettings for this field in each tableview
global $DIC
Definition: feed.php:28
$query
getDescription()
Get description.
updateTableFieldSetting()
update exportable and fieldorder
static _tableExists(int $table_id)
getDatatypeId()
Get datatype_id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doDelete()

ilDclBaseFieldModel::doDelete ( )

Remove field and properties.

Definition at line 428 of file class.ilDclBaseFieldModel.php.

References $DIC, $ilDB, $query, getId(), ilDclTableFieldSetting\getInstance(), getTableId(), and getViewSettings().

428  : void
429  {
430  global $DIC;
431  $ilDB = $DIC['ilDB'];
432 
433  // delete tablefield setting.
434  ilDclTableFieldSetting::getInstance($this->getTableId(), $this->getId())->delete();
435 
436  $query = "DELETE FROM il_dcl_field_prop WHERE field_id = " . $ilDB->quote($this->getId(), "text");
437  $ilDB->manipulate($query);
438 
439  $query = "DELETE FROM il_dcl_field WHERE id = " . $ilDB->quote($this->getId(), "text");
440  $ilDB->manipulate($query);
441 
442  foreach ($this->getViewSettings() as $field_setting) {
443  $field_setting->delete();
444  }
445  }
global $DIC
Definition: feed.php:28
$query
static getInstance(int $table_id, string $field)
+ Here is the call graph for this function:

◆ doRead()

ilDclBaseFieldModel::doRead ( )

Definition at line 293 of file class.ilDclBaseFieldModel.php.

References $query, getId(), loadProperties(), loadTableFieldSetting(), setDatatypeId(), setDescription(), setTableId(), setTitle(), and setUnique().

Referenced by __construct().

293  : void
294  {
295  //THEN 1 ELSE 0 END AS has_options FROM il_dcl_field f WHERE id = ".$ilDB->quote($this->getId(),"integer");
296  $query = "SELECT * FROM il_dcl_field WHERE id = " . $this->db->quote($this->getId(), "integer");
297  $set = $this->db->query($query);
298  $rec = $this->db->fetchAssoc($set);
299 
300  if ($rec) {
301  $this->setTableId($rec["table_id"]);
302  if (null !== $rec["title"]) {
303  $this->setTitle($rec["title"]);
304  }
305  if (null !== $rec["description"]) {
306  $this->setDescription($rec["description"]);
307  }
308  $this->setDatatypeId($rec["datatype_id"]);
309  $this->setUnique($rec["is_unique"]);
310  }
311 
312  $this->loadProperties();
313  $this->loadTableFieldSetting();
314  }
loadTableFieldSetting()
loadTableFieldSetting
loadProperties()
Get all properties of a field.
setDatatypeId(int $a_id)
Set datatype id.
$query
setTitle(string $a_title)
Set title.
setDescription(string $a_desc)
Set description.
setTableId(int $a_id)
Set table id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doUpdate()

ilDclBaseFieldModel::doUpdate ( )

Definition at line 364 of file class.ilDclBaseFieldModel.php.

References $DIC, $ilDB, getDatatypeId(), getDescription(), getId(), getTableId(), getTitle(), isUnique(), updateProperties(), and updateTableFieldSetting().

364  : void
365  {
366  global $DIC;
367  $ilDB = $DIC['ilDB'];
368 
369  $ilDB->update(
370  "il_dcl_field",
371  array(
372  "table_id" => array(
373  "integer",
374  $this->getTableId(),
375  ),
376  "datatype_id" => array(
377  "text",
378  $this->getDatatypeId(),
379  ),
380  "title" => array(
381  "text",
382  $this->getTitle(),
383  ),
384  "description" => array(
385  "text",
386  $this->getDescription(),
387  ),
388  "is_unique" => array(
389  "integer",
390  $this->isUnique(),
391  ),
392  ),
393  array(
394  "id" => array(
395  "integer",
396  $this->getId(),
397  ),
398  )
399  );
400  $this->updateTableFieldSetting();
401  $this->updateProperties();
402  }
updateProperties()
Update properties of this field in Database.
global $DIC
Definition: feed.php:28
getDescription()
Get description.
updateTableFieldSetting()
update exportable and fieldorder
getDatatypeId()
Get datatype_id.
+ Here is the call graph for this function:

◆ fillHeaderExcel()

ilDclBaseFieldModel::fillHeaderExcel ( ilExcel  $worksheet,
int &  $row,
int &  $col 
)

Definition at line 735 of file class.ilDclBaseFieldModel.php.

References getTitle(), and ilExcel\setCell().

735  : void
736  {
737  $worksheet->setCell($row, $col, $this->getTitle());
738  $col++;
739  }
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value.
+ Here is the call graph for this function:

◆ fillPropertiesForm()

ilDclBaseFieldModel::fillPropertiesForm ( ilPropertyFormGUI $form)

called to fill the 'edit field' form

Definition at line 773 of file class.ilDclBaseFieldModel.php.

References getDatatypeId(), getDescription(), getId(), getProperty(), getTableId(), getTitle(), getValidFieldProperties(), isUnique(), and ilPropertyFormGUI\setValuesByArray().

773  : bool
774  {
775  $values = array(
776  'table_id' => $this->getTableId(),
777  'field_id' => $this->getId(),
778  'title' => $this->getTitle(),
779  'datatype' => $this->getDatatypeId(),
780  'description' => $this->getDescription(),
781  'unique' => $this->isUnique(),
782  );
783 
784  $properties = $this->getValidFieldProperties();
785  foreach ($properties as $prop) {
786  $values['prop_' . $prop] = $this->getProperty($prop);
787  }
788 
789  $form->setValuesByArray($values);
790 
791  return true;
792  }
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)
getDescription()
Get description.
getProperty(string $key)
Returns a certain property of a field.
getValidFieldProperties()
Returns all valid properties for a field-type.
getDatatypeId()
Get datatype_id.
+ Here is the call graph for this function:

◆ getConfirmationGUI()

ilDclBaseFieldModel::getConfirmationGUI ( ilPropertyFormGUI  $form)

called by ilDclFieldEditGUI if isConfirmationRequired returns true

Definition at line 806 of file class.ilDclBaseFieldModel.php.

References $DIC, ilFormGUI\getFormAction(), and ilPropertyFormGUI\getInput().

807  {
808  global $DIC;
809  $ilConfirmationGUI = new ilConfirmationGUI();
810  $ilConfirmationGUI->setFormAction($form->getFormAction());
811  $ilConfirmationGUI->addHiddenItem('confirmed', 1);
812  $ilConfirmationGUI->addHiddenItem('field_id', $form->getInput('field_id'));
813  $ilConfirmationGUI->addHiddenItem('title', $form->getInput('title'));
814  $ilConfirmationGUI->addHiddenItem('description', $form->getInput('description'));
815  $ilConfirmationGUI->addHiddenItem('datatype', $form->getInput('datatype'));
816  $ilConfirmationGUI->addHiddenItem('unique', $form->getInput('unique'));
817  $ilConfirmationGUI->setConfirm($DIC->language()->txt('dcl_update_field'), 'update');
818  $ilConfirmationGUI->setCancel($DIC->language()->txt('cancel'), 'edit');
819 
820  return $ilConfirmationGUI;
821  }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getDatatype()

ilDclBaseFieldModel::getDatatype ( )

Definition at line 204 of file class.ilDclBaseFieldModel.php.

References $datatype, and loadDatatype().

Referenced by ilDclFieldFactory\getClassPathByInstance(), ilDclFieldFactory\getFieldTypeByInstance(), ilDclPluginFieldModel\getPresentationDescription(), and ilDclPluginFieldModel\getPresentationTitle().

204  : ilDclDatatype
205  {
206  $this->loadDatatype();
207 
208  return $this->datatype;
209  }
loadDatatype()
Load datatype for model.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDatatypeId()

◆ getDatatypeTitle()

ilDclBaseFieldModel::getDatatypeTitle ( )

Definition at line 211 of file class.ilDclBaseFieldModel.php.

References loadDatatype().

Referenced by getPresentationDescription(), and getPresentationTitle().

211  : string
212  {
213  $this->loadDatatype();
214  return $this->datatype->getTitle();
215  }
loadDatatype()
Load datatype for model.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDescription()

ilDclBaseFieldModel::getDescription ( )

Get description.

Definition at line 167 of file class.ilDclBaseFieldModel.php.

References $description.

Referenced by doCreate(), doUpdate(), ilDclSelectionFieldModel\fillPropertiesForm(), fillPropertiesForm(), ilDclFieldListTableGUI\fillRowFromObject(), and ilDclBaseFieldRepresentation\setupInputField().

167  : string
168  {
169  return $this->description;
170  }
+ Here is the caller graph for this function:

◆ getExportable()

ilDclBaseFieldModel::getExportable ( )
Returns
bool

Definition at line 264 of file class.ilDclBaseFieldModel.php.

References $exportable, and loadExportability().

Referenced by ilDclStandardField\clone(), and ilDclFieldListTableGUI\fillRowFromObject().

264  : bool
265  {
266  if (!isset($this->exportable)) {
267  $this->loadExportability();
268  }
269 
270  return $this->exportable;
271  }
loadExportability()
Load exportability.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

ilDclBaseFieldModel::getId ( )

Get field id.

Definition at line 115 of file class.ilDclBaseFieldModel.php.

References $id.

Referenced by ilDclTable\addField(), ilDclCopyFieldRepresentation\buildFieldCreationInput(), ilDclReferenceFieldRepresentation\buildFieldCreationInput(), ilDclTextFieldModel\checkValidity(), ilDclTextFieldModel\checkValidityFromForm(), checkValidityFromForm(), ilDclTextFieldModel\checkValidityOfURLField(), ilDclSelectionFieldModel\cloneProperties(), cloneProperties(), cloneStructure(), doCreate(), ilDclSelectionFieldModel\doDelete(), doDelete(), doRead(), doUpdate(), ilDclStandardField\fillHeaderExcel(), ilDclSelectionFieldModel\fillPropertiesForm(), fillPropertiesForm(), ilDclFieldListTableGUI\fillRowFromObject(), ilDclFieldFactory\getClassPathByInstance(), getDatatypeId(), ilDclFieldFactory\getFieldModelInstanceByClass(), ilDclReferenceFieldModel\getFieldRef(), ilDclCache\getFieldRepresentation(), ilDclFieldFactory\getFieldRepresentationInstance(), ilDclSelectionFieldModel\getProperty(), ilDclBaseRecordModel\getRecordFieldValueFromExcel(), ilDclCopyFieldModel\getRecordQueryFilterObject(), ilDclTextFieldModel\getRecordQueryFilterObject(), ilDclNumberFieldModel\getRecordQueryFilterObject(), ilDclBooleanFieldModel\getRecordQueryFilterObject(), ilDclDatetimeFieldModel\getRecordQueryFilterObject(), ilDclSelectionFieldModel\getRecordQueryFilterObject(), ilDclFileuploadFieldModel\getRecordQueryFilterObject(), ilDclIliasReferenceFieldModel\getRecordQueryFilterObject(), ilDclReferenceFieldModel\getRecordQueryFilterObject(), ilDclFileuploadFieldModel\getRecordQuerySortObject(), ilDclIliasReferenceFieldModel\getRecordQuerySortObject(), ilDclReferenceFieldModel\getRecordQuerySortObject(), ilDclStandardField\getRecordQuerySortObject(), ilDclSelectionFieldModel\getRecordQuerySortObject(), getRecordQuerySortObject(), ilDclReferenceRecordFieldModel\getReferenceFromValue(), ilDclStandardField\getSortField(), getViewSetting(), getViewSettings(), ilDclStandardField\hasNumericSorting(), loadProperties(), loadTableFieldSetting(), ilDclSelectionFieldModel\multiPropertyChanged(), ilDclSelectionFieldModel\reorderExistingValues(), ilDclSelectionFieldModel\setProperty(), setProperty(), ilDclBaseRecordModel\setStandardFieldValueFromExcel(), ilDclExpressionParser\substituteFieldValues(), and updateTableFieldSetting().

115  : string
116  {
117  return $this->id;
118  }
+ Here is the caller graph for this function:

◆ getOrder()

ilDclBaseFieldModel::getOrder ( )

Definition at line 461 of file class.ilDclBaseFieldModel.php.

References $order, and loadTableFieldSetting().

Referenced by ilDclStandardField\clone(), ilDclTable\compareOrder(), and updateTableFieldSetting().

461  : int
462  {
463  if ($this->order == null) {
464  $this->loadTableFieldSetting();
465  }
466 
467  return !$this->order ? 0 : $this->order;
468  }
loadTableFieldSetting()
loadTableFieldSetting
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPresentationDescription()

ilDclBaseFieldModel::getPresentationDescription ( )

Definition at line 222 of file class.ilDclBaseFieldModel.php.

References getDatatypeTitle(), and ILIAS\Repository\lng().

222  : string
223  {
224  return $this->lng->txt('dcl_' . $this->getDatatypeTitle() . '_desc');
225  }
+ Here is the call graph for this function:

◆ getPresentationTitle()

ilDclBaseFieldModel::getPresentationTitle ( )

Definition at line 217 of file class.ilDclBaseFieldModel.php.

References getDatatypeTitle(), and ILIAS\Repository\lng().

Referenced by ilDclFieldListTableGUI\fillRowFromObject().

217  : string
218  {
219  return $this->lng->txt('dcl_' . $this->getDatatypeTitle());
220  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getProperty()

ilDclBaseFieldModel::getProperty ( string  $key)

Returns a certain property of a field.

Returns
?mixed

Definition at line 497 of file class.ilDclBaseFieldModel.php.

References getPropertyInstance().

Referenced by ilDclTextFieldModel\checkRegexAndLength(), ilDclTextFieldModel\checkValidity(), ilDclTextFieldModel\checkValidityFromForm(), cloneProperties(), ilDclTextFieldModel\fillHeaderExcel(), fillPropertiesForm(), ilDclReferenceFieldModel\getFieldRef(), ilDclReferenceFieldModel\getRecordQueryFilterObject(), ilDclReferenceFieldModel\getRecordQuerySortObject(), ilDclFileuploadFieldModel\getSupportedExtensions(), and ilDclMobRecordFieldModel\parseValue().

498  {
499  $instance = $this->getPropertyInstance($key);
500 
501  return ($instance !== null) ? $instance->getValue() : null;
502  }
getPropertyInstance(string $key)
Return ActiveRecord of property.
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPropertyInstance()

ilDclBaseFieldModel::getPropertyInstance ( string  $key)

Return ActiveRecord of property.

Returns
?ilDclFieldProperty

Definition at line 508 of file class.ilDclBaseFieldModel.php.

References ILIAS\LTI\ToolProvider\$key, hasProperty(), and loadProperties().

Referenced by getProperty(), ilDclSelectionFieldModel\storePropertiesFromForm(), and storePropertiesFromForm().

509  {
510  $this->loadProperties();
511  if ($this->hasProperty($key)) {
512  $value = $this->property[$key];
513 
514  return $value;
515  }
516 
517  return null;
518  }
hasProperty(string $key)
Checks if a certain property for a field is set.
loadProperties()
Get all properties of a field.
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRecordQueryFilterObject()

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

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

Parameters
string | int$filter_value

Definition at line 682 of file class.ilDclBaseFieldModel.php.

686  return null;
687  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getRecordQuerySortObject()

ilDclBaseFieldModel::getRecordQuerySortObject ( string  $direction = "asc",
bool  $sort_by_status = false 
)

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

Parameters
bool$sort_by_statusThe specific sort object is a status field

Definition at line 656 of file class.ilDclBaseFieldModel.php.

References $DIC, $ilDB, and getId().

660  global $DIC;
661  $ilDB = $DIC['ilDB'];
662 
663  $sql_obj = new ilDclRecordQueryObject();
664 
665  $select_str = "sort_stloc_{$this->getId()}.value AS field_{$this->getId()}";
666  $join_str
667  = "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 = "
668  . $ilDB->quote($this->getId(), 'integer') . ") ";
669  $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)";
670 
671  $sql_obj->setSelectStatement($select_str);
672  $sql_obj->setJoinStatement($join_str);
673  $sql_obj->setOrderStatement("field_{$this->getId()} {$direction}, ID ASC");
674 
675  return $sql_obj;
676  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ getSortField()

ilDclBaseFieldModel::getSortField ( )

Returns the sort-field id.

Definition at line 692 of file class.ilDclBaseFieldModel.php.

References getTitle().

692  : string
693  {
694  return $this->getTitle();
695  }
+ Here is the call graph for this function:

◆ getStorageLocation()

ilDclBaseFieldModel::getStorageLocation ( )

Get storage location for the model.

Definition at line 230 of file class.ilDclBaseFieldModel.php.

References getStorageLocationOverride(), and loadDatatype().

230  : ?int
231  {
232  if ($this->getStorageLocationOverride() !== null) {
233  return $this->getStorageLocationOverride();
234  }
235 
236  $this->loadDatatype();
237 
238  return $this->datatype->getStorageLocation();
239  }
loadDatatype()
Load datatype for model.
+ Here is the call graph for this function:

◆ getStorageLocationOverride()

ilDclBaseFieldModel::getStorageLocationOverride ( )
Deprecated:

Definition at line 722 of file class.ilDclBaseFieldModel.php.

References $storage_location_override.

Referenced by getStorageLocation().

722  : ?int
723  {
725  }
int $storage_location_override
With this property the datatype-storage-location can be overwritten.
+ Here is the caller graph for this function:

◆ getTableId()

◆ getTitle()

◆ getValidFieldProperties()

ilDclBaseFieldModel::getValidFieldProperties ( )

Returns all valid properties for a field-type.

Definition at line 544 of file class.ilDclBaseFieldModel.php.

Referenced by cloneProperties(), fillPropertiesForm(), and storePropertiesFromForm().

544  : array
545  {
546  return [];
547  }
+ Here is the caller graph for this function:

◆ getViewSetting()

ilDclBaseFieldModel::getViewSetting ( int  $tableview_id)

Definition at line 455 of file class.ilDclBaseFieldModel.php.

References getId(), and ilDclTableViewFieldSetting\getTableViewFieldSetting().

456  {
458  return ilDclTableViewFieldSetting::getTableViewFieldSetting($this->getId(), $tableview_id);
459  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getTableViewFieldSetting(string $id, int $tableview_id)
+ Here is the call graph for this function:

◆ getViewSettings()

ilDclBaseFieldModel::getViewSettings ( )
Returns
ilDclTableViewFieldSetting[]

Definition at line 450 of file class.ilDclBaseFieldModel.php.

References getId(), and ActiveRecord\where().

Referenced by doDelete().

450  : array
451  {
452  return ilDclTableViewFieldSetting::where(array('field' => $this->getId()))->get();
453  }
static where($where, $operator=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasNumericSorting()

ilDclBaseFieldModel::hasNumericSorting ( )

Set to true, when the sorting should be handled numerical.

Definition at line 700 of file class.ilDclBaseFieldModel.php.

References getDatatypeId(), and ilDclDatatype\INPUTFORMAT_NUMBER.

700  : bool
701  {
703  return true;
704  }
705 
706  return false;
707  }
getDatatypeId()
Get datatype_id.
+ Here is the call graph for this function:

◆ hasProperty()

ilDclBaseFieldModel::hasProperty ( string  $key)

Checks if a certain property for a field is set.

Definition at line 486 of file class.ilDclBaseFieldModel.php.

References ILIAS\UI\Implementation\Component\Input\getValue(), and loadProperties().

Referenced by ilDclTextFieldModel\checkTitlesForImport(), getPropertyInstance(), ilDclReferenceFieldModel\getRecordQuerySortObject(), ilDclTextFieldModel\getRecordQuerySortObject(), and ilDclFileuploadFieldModel\getSupportedExtensions().

486  : bool
487  {
488  $this->loadProperties();
489 
490  return (isset($this->property[$key]) && $this->property[$key]->getValue() != null);
491  }
getValue()
Get the value that is displayed in the input client side.
Definition: Group.php:47
loadProperties()
Get all properties of a field.
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isConfirmationRequired()

ilDclBaseFieldModel::isConfirmationRequired ( ilPropertyFormGUI  $form)

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

Definition at line 798 of file class.ilDclBaseFieldModel.php.

798  : bool
799  {
800  return false;
801  }

◆ isStandardField()

ilDclBaseFieldModel::isStandardField ( )

Definition at line 288 of file class.ilDclBaseFieldModel.php.

Referenced by ilDclFieldListTableGUI\fillRowFromObject(), and getDatatypeId().

288  : bool
289  {
290  return false;
291  }
+ Here is the caller graph for this function:

◆ isUnique()

◆ loadDatatype()

ilDclBaseFieldModel::loadDatatype ( )
protected

Load datatype for model.

Definition at line 244 of file class.ilDclBaseFieldModel.php.

References ilDclCache\getDatatype().

Referenced by getDatatype(), getDatatypeTitle(), and getStorageLocation().

244  : void
245  {
246  if ($this->datatype == null) {
247  $this->datatype = ilDclCache::getDatatype($this->datatypeId);
248  }
249  }
static getDatatype(int $datatyp_id)
Get cached datatypes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadExportability()

ilDclBaseFieldModel::loadExportability ( )
private

Load exportability.

Definition at line 276 of file class.ilDclBaseFieldModel.php.

References loadTableFieldSetting().

Referenced by getExportable().

276  : void
277  {
278  if ($this->exportable == null) {
279  $this->loadTableFieldSetting();
280  }
281  }
loadTableFieldSetting()
loadTableFieldSetting
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadProperties()

ilDclBaseFieldModel::loadProperties ( )
protected

Get all properties of a field.

Definition at line 478 of file class.ilDclBaseFieldModel.php.

References ilDclCache\getFieldProperties(), and getId().

Referenced by doRead(), getPropertyInstance(), hasProperty(), and setProperty().

478  : void
479  {
480  $this->property = ilDclCache::getFieldProperties($this->getId());
481  }
static getFieldProperties($field_id)
Cache Field properties.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadTableFieldSetting()

ilDclBaseFieldModel::loadTableFieldSetting ( )
protected

loadTableFieldSetting

Definition at line 254 of file class.ilDclBaseFieldModel.php.

References getId(), ilDclTableFieldSetting\getInstance(), and getTableId().

Referenced by doRead(), getOrder(), and loadExportability().

254  : void
255  {
256  $tablefield_setting = ilDclTableFieldSetting::getInstance($this->getTableId(), $this->getId());
257  $this->exportable = $tablefield_setting->isExportable();
258  $this->order = $tablefield_setting->getFieldOrder();
259  }
static getInstance(int $table_id, string $field)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalizeValue()

ilDclBaseFieldModel::normalizeValue (   $value)
protected
Parameters
mixed$value

Definition at line 582 of file class.ilDclBaseFieldModel.php.

Referenced by ilDclTextFieldModel\checkValidity(), ilDclFileuploadFieldModel\checkValidity(), and checkValidity().

583  {
584  if (is_string($value)) {
585  $value = trim(preg_replace("/\\s+/uism", " ", $value));
586  }
587 
588  return $value;
589  }
+ Here is the caller graph for this function:

◆ setDatatypeId()

ilDclBaseFieldModel::setDatatypeId ( int  $a_id)

Set datatype id.

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

Referenced by buildFromDBRecord(), cloneStructure(), and doRead().

175  : void
176  {
177  //unset the cached datatype.
178  $this->datatype = null;
179  $this->datatypeId = $a_id;
180  }
+ Here is the caller graph for this function:

◆ setDescription()

ilDclBaseFieldModel::setDescription ( string  $a_desc)

Set description.

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

Referenced by buildFromDBRecord(), cloneStructure(), and doRead().

159  : void
160  {
161  $this->description = $a_desc;
162  }
+ Here is the caller graph for this function:

◆ setExportable()

ilDclBaseFieldModel::setExportable ( bool  $exportable)

Definition at line 642 of file class.ilDclBaseFieldModel.php.

References $exportable.

Referenced by ilDclStandardField\clone(), and cloneStructure().

642  : void
643  {
644  $this->exportable = $exportable;
645  }
+ Here is the caller graph for this function:

◆ setId()

ilDclBaseFieldModel::setId (   $a_id)

Set field id.

Parameters
int|string

Definition at line 107 of file class.ilDclBaseFieldModel.php.

Referenced by buildFromDBRecord(), and doCreate().

107  : void
108  {
109  $this->id = $a_id;
110  }
+ Here is the caller graph for this function:

◆ setOrder()

ilDclBaseFieldModel::setOrder ( string  $order)

Definition at line 470 of file class.ilDclBaseFieldModel.php.

References $order.

Referenced by ilDclStandardField\clone(), and cloneStructure().

470  : void
471  {
472  $this->order = $order;
473  }
+ Here is the caller graph for this function:

◆ setProperty()

ilDclBaseFieldModel::setProperty ( string  $key,
  $value 
)

Set a property for a field (does not save)

Parameters
string | array | int$value

Definition at line 524 of file class.ilDclBaseFieldModel.php.

References ILIAS\LTI\ToolProvider\$key, $property, getId(), and loadProperties().

Referenced by ilDclReferenceFieldModel\getFieldRef(), and storePropertiesFromForm().

525  {
526  $this->loadProperties();
527  if (isset($this->property[$key])) {
528  $this->property[$key]->setValue($value);
529  } else {
531  $property->setName($key);
532  $property->setFieldId($this->getId());
533  $property->setValue($value);
534 
535  $this->property[$key] = $property;
536  }
537 
538  return $this->property[$key];
539  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
loadProperties()
Get all properties of a field.
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStorageLocationOverride()

ilDclBaseFieldModel::setStorageLocationOverride ( ?int  $storage_location_override)
Deprecated:
override ilDclFieldTypePlugin::getStorageLocation() instead

Definition at line 730 of file class.ilDclBaseFieldModel.php.

References $storage_location_override.

730  : void
731  {
732  $this->storage_location_override = $storage_location_override;
733  }
int $storage_location_override
With this property the datatype-storage-location can be overwritten.

◆ setTableId()

ilDclBaseFieldModel::setTableId ( int  $a_id)

Set table id.

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

Referenced by buildFromDBRecord(), and doRead().

123  : void
124  {
125  $this->table_id = $a_id;
126  }
+ Here is the caller graph for this function:

◆ setTitle()

ilDclBaseFieldModel::setTitle ( string  $a_title)

Set title.

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

Referenced by buildFromDBRecord(), cloneStructure(), and doRead().

139  : void
140  {
141  //title cannot begin with _ as this is saved for other purposes. make __ instead.
142  if (substr($a_title, 0, 1) == "_" && substr($a_title, 0, 2) != "__") {
143  $a_title = "_" . $a_title;
144  }
145  $this->title = $a_title;
146  }
+ Here is the caller graph for this function:

◆ setUnique()

ilDclBaseFieldModel::setUnique ( ?bool  $unique)

Definition at line 199 of file class.ilDclBaseFieldModel.php.

Referenced by buildFromDBRecord(), ilDclStandardField\clone(), cloneStructure(), and doRead().

199  : void
200  {
201  $this->unique = $unique ? 1 : 0;
202  }
+ Here is the caller graph for this function:

◆ storePropertiesFromForm()

ilDclBaseFieldModel::storePropertiesFromForm ( ilPropertyFormGUI  $form)

called when saving the 'edit field' form

Definition at line 756 of file class.ilDclBaseFieldModel.php.

References ilDclFieldFactory\getFieldRepresentationInstance(), ilPropertyFormGUI\getInput(), getPropertyInstance(), getValidFieldProperties(), and setProperty().

756  : void
757  {
758  $field_props = $this->getValidFieldProperties();
759  foreach ($field_props as $property) {
760  $representation = ilDclFieldFactory::getFieldRepresentationInstance($this);
761  $value = $form->getInput($representation->getPropertyInputFieldId($property));
762 
763  // save non empty values and set them to null, when they already exist. Do not override plugin-hook when already set.
764  if (!empty($value) || ($this->getPropertyInstance($property) != null && $property != self::PROP_PLUGIN_HOOK_NAME)) {
765  $this->setProperty($property, $value)->store();
766  }
767  }
768  }
getPropertyInstance(string $key)
Return ActiveRecord of property.
static getFieldRepresentationInstance(ilDclBaseFieldModel $field)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
getValidFieldProperties()
Returns all valid properties for a field-type.
setProperty(string $key, $value)
Set a property for a field (does not save)
+ Here is the call graph for this function:

◆ toArray()

ilDclBaseFieldModel::toArray ( )

Definition at line 283 of file class.ilDclBaseFieldModel.php.

283  : array
284  {
285  return (array) $this;
286  }

◆ updateProperties()

ilDclBaseFieldModel::updateProperties ( )

Update properties of this field in Database.

Definition at line 407 of file class.ilDclBaseFieldModel.php.

Referenced by doUpdate(), and ilDclReferenceFieldModel\getFieldRef().

407  : void
408  {
409  foreach ($this->property as $prop) {
410  $prop->store();
411  }
412  }
+ Here is the caller graph for this function:

◆ updateTableFieldSetting()

ilDclBaseFieldModel::updateTableFieldSetting ( )
protected

update exportable and fieldorder

Definition at line 417 of file class.ilDclBaseFieldModel.php.

References getId(), ilDclTableFieldSetting\getInstance(), getOrder(), and getTableId().

Referenced by doCreate(), ilDclStandardField\doUpdate(), and doUpdate().

417  : void
418  {
419  $tablefield_setting = ilDclTableFieldSetting::getInstance($this->getTableId(), $this->getId());
420  $tablefield_setting->setExportable($this->exportable);
421  $tablefield_setting->setFieldOrder($this->getOrder());
422  $tablefield_setting->store();
423  }
static getInstance(int $table_id, string $field)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $datatype

ilDclDatatype ilDclBaseFieldModel::$datatype = null
protected

◆ $datatypeId

int ilDclBaseFieldModel::$datatypeId = 0
protected

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

Referenced by getDatatypeId().

◆ $db

ilDBInterface ilDclBaseFieldModel::$db
protected

Definition at line 60 of file class.ilDclBaseFieldModel.php.

◆ $description

string ilDclBaseFieldModel::$description = ""
protected

Definition at line 24 of file class.ilDclBaseFieldModel.php.

Referenced by getDescription().

◆ $exportable

bool ilDclBaseFieldModel::$exportable = false
protected

Definition at line 30 of file class.ilDclBaseFieldModel.php.

Referenced by getExportable(), and setExportable().

◆ $id

◆ $lng

ilLanguage ilDclBaseFieldModel::$lng
protected

◆ $order

int ilDclBaseFieldModel::$order = null
protected

Definition at line 26 of file class.ilDclBaseFieldModel.php.

Referenced by getOrder(), and setOrder().

◆ $property

array ilDclBaseFieldModel::$property = []
protected

◆ $storage_location_override

int ilDclBaseFieldModel::$storage_location_override = null
protected

With this property the datatype-storage-location can be overwritten.

This need to be done in plugins.

Definition at line 35 of file class.ilDclBaseFieldModel.php.

Referenced by getStorageLocationOverride(), and setStorageLocationOverride().

◆ $table_id

int ilDclBaseFieldModel::$table_id = 0
protected

◆ $title

string ilDclBaseFieldModel::$title = ""
protected

◆ $unique

bool ilDclBaseFieldModel::$unique = false
protected

Definition at line 27 of file class.ilDclBaseFieldModel.php.

Referenced by isUnique().

◆ EDIT_VIEW

const ilDclBaseFieldModel::EDIT_VIEW = 2

Definition at line 57 of file class.ilDclBaseFieldModel.php.

◆ EXPORTABLE_VIEW

const ilDclBaseFieldModel::EXPORTABLE_VIEW = 4

Definition at line 58 of file class.ilDclBaseFieldModel.php.

◆ PROP_DISPLAY_COPY_LINK_ACTION_MENU

const ilDclBaseFieldModel::PROP_DISPLAY_COPY_LINK_ACTION_MENU = "display_action_menu"

◆ PROP_FORMULA_EXPRESSION

const ilDclBaseFieldModel::PROP_FORMULA_EXPRESSION = "expression"

◆ PROP_HEIGHT

◆ PROP_ILIAS_REFERENCE_LINK

◆ PROP_LEARNING_PROGRESS

const ilDclBaseFieldModel::PROP_LEARNING_PROGRESS = "learning_progress"

◆ PROP_LENGTH

◆ PROP_LINK_DETAIL_PAGE_MOB

const ilDclBaseFieldModel::PROP_LINK_DETAIL_PAGE_MOB = "link_detail_page_mob"

◆ PROP_LINK_DETAIL_PAGE_TEXT

const ilDclBaseFieldModel::PROP_LINK_DETAIL_PAGE_TEXT = "link_detail_page_text"

◆ PROP_N_REFERENCE

◆ PROP_PLUGIN_HOOK_NAME

const ilDclBaseFieldModel::PROP_PLUGIN_HOOK_NAME = "plugin_hook_name"

◆ PROP_REFERENCE

◆ PROP_REFERENCE_LINK

◆ PROP_REGEX

◆ PROP_SUPPORTED_FILE_TYPES

const ilDclBaseFieldModel::PROP_SUPPORTED_FILE_TYPES = "supported_file_types"

◆ PROP_TEXTAREA

◆ PROP_URL

◆ PROP_WIDTH


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