ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilDclBaseFieldModel Class Reference
+ 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...
 
 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 (int $order)
 
 hasProperty (string $key)
 Checks if a certain property for a field is set. More...
 
 getProperty (string $key)
 
 getPropertyInstance (string $key)
 
 setProperty (string $key, $value)
 
 getValidFieldProperties ()
 Returns all valid properties for a field-type. More...
 
 checkValidityFromForm (ilPropertyFormGUI &$form, ?int $record_id)
 
 checkValidity ($value, ?int $record_id)
 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...
 
 checkUniqueProp (ilPropertyFormGUI $form)
 
 checkUnique ($value, ?int $record_id)
 
 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_REFERENCE_LINK = "reference_link"
 
const PROP_UNIQUE = "unique"
 
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...
 
 areEqual ($value_1, $value_2)
 
 normalizeValue (mixed $value)
 

Protected Attributes

string $id = ""
 
int $table_id = 0
 
string $title = ""
 
string $description = ""
 
int $datatype_id = 0
 
int $order = null
 
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

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

Constructor & Destructor Documentation

◆ __construct()

ilDclBaseFieldModel::__construct ( int  $a_id = 0)

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

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

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

Member Function Documentation

◆ _getFieldIdByTitle()

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

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

References $DIC, $id, and $ilDB.

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

◆ _getTitleInvalidChars()

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

All valid chars for filed titles.

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

Referenced by ilDclFieldEditGUI\initForm().

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

◆ addToTableViews()

ilDclBaseFieldModel::addToTableViews ( )
protected

create ilDclTableViewFieldSettings for this field in each tableview

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

References ilDclTableView\getAllForTableId().

Referenced by doCreate().

344  : void
345  {
346  foreach (ilDclTableView::getAllForTableId($this->table_id) as $tableview) {
347  $tableview->createFieldSetting($this->id);
348  }
349  }
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 559 of file class.ilDclBaseFieldModel.php.

References ilDclCache\getRecordFieldCache().

Referenced by ilDclReferenceFieldModel\getFieldRef(), and ilDclCopyFieldModel\getValidFieldProperties().

560  {
561  foreach ($records as $rec) {
562  ilDclCache::getRecordFieldCache($rec, $this)->afterClone();
563  }
564  }
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 601 of file class.ilDclBaseFieldModel.php.

601  : bool
602  {
603  return true;
604  }

◆ areEqual()

ilDclBaseFieldModel::areEqual (   $value_1,
  $value_2 
)
protected

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

References normalizeValue().

Referenced by checkUnique(), and checkUniqueProp().

527  : bool
528  {
529  return $this->normalizeValue($value_1) === $this->normalizeValue($value_2);
530  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFromDBRecord()

ilDclBaseFieldModel::buildFromDBRecord ( array  $rec)

Builds model from db record.

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

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

310  : void
311  {
312  $this->setId($rec["id"]);
313  $this->setTableId($rec["table_id"]);
314  $this->setTitle($rec["title"]);
315  $this->setDescription($rec["description"]);
316  $this->setDatatypeId($rec["datatype_id"]);
317  }
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 665 of file class.ilDclBaseFieldModel.php.

665  : bool
666  {
667  return true;
668  }

◆ checkTitlesForImport()

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

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

References getTitle().

726  : void
727  {
728  foreach ($titles as $k => $title) {
729  if (!mb_detect_encoding($title, "UTF-8", true) == "UTF-8") {
730  $title = mb_convert_encoding($title, 'UTF-8', 'ISO-8859-1');
731  }
732  if ($title == $this->getTitle()) {
733  $import_fields[$k] = $this;
734  }
735  }
736  }
+ Here is the call graph for this function:

◆ checkUnique()

ilDclBaseFieldModel::checkUnique (   $value,
?int  $record_id 
)

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

References areEqual(), getId(), getProperty(), ilDclCache\getTableCache(), getTableId(), PROP_UNIQUE, and ilDclInputException\UNIQUE_EXCEPTION.

Referenced by ilDclTextFieldModel\checkValidity(), ilDclIliasReferenceFieldModel\checkValidity(), and ilDclSelectionFieldModel\checkValidity().

688  : bool
689  {
690  if ($value && $this->getProperty(ilDclBaseFieldModel::PROP_UNIQUE) === '1') {
691  foreach (ilDclCache::getTableCache($this->getTableId())->getRecords() as $record) {
692  if ($record->getId() !== $record_id) {
693  $x = $record->getRecordFieldValue($this->getId());
694  if ($this->areEqual($record->getRecordFieldValue($this->getId()), $value)) {
696  }
697  }
698  }
699  }
700 
701  return true;
702  }
static getTableCache(?int $table_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkUniqueProp()

ilDclBaseFieldModel::checkUniqueProp ( ilPropertyFormGUI  $form)

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

References areEqual(), getId(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), ilDclCache\getTableCache(), getTableId(), ILIAS\Repository\lng(), and PROP_UNIQUE.

Referenced by ilDclTextFieldModel\checkFieldCreationInput(), ilDclIliasReferenceFieldModel\checkFieldCreationInput(), and ilDclSelectionFieldModel\checkFieldCreationInput().

670  : bool
671  {
672  if ($this->getId() !== '' && $form->getInput('prop_' . ilDclBaseFieldModel::PROP_UNIQUE) === '1') {
673  $values = [];
674  foreach (ilDclCache::getTableCache($this->getTableId())->getRecords() as $record) {
675  $new = $record->getRecordFieldValue($this->getId());
676  foreach ($values as $value) {
677  if ($this->areEqual($new, $value)) {
678  $form->getItemByPostVar('prop_' . ilDclBaseFieldModel::PROP_UNIQUE)->setAlert($this->lng->txt('duplicate_entries_exist'));
679  return false;
680  }
681  }
682  $values[] = $new;
683  }
684  }
685  return true;
686  }
getItemByPostVar(string $a_post_var)
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-...
static getTableCache(?int $table_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkValidity()

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

Check if input is valid.

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

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

Referenced by checkValidityFromForm().

522  : bool
523  {
524  return true;
525  }
+ Here is the caller graph for this function:

◆ checkValidityFromForm()

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

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

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

511  : void
512  {
513  $value = $form->getInput('field_' . $this->getId());
514  $this->checkValidity($value, $record_id);
515  }
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-...
checkValidity($value, ?int $record_id)
Check if input is valid.
+ Here is the call graph for this function:

◆ cloneProperties()

ilDclBaseFieldModel::cloneProperties ( ilDclBaseFieldModel  $originalField)

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

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

Referenced by cloneStructure().

566  : void
567  {
568  $orgProps = $originalField->getValidFieldProperties();
569  if (count($orgProps) == 0) {
570  return;
571  }
572  foreach ($orgProps as $prop_name) {
573  $fieldprop_obj = new ilDclFieldProperty();
574  $fieldprop_obj->setFieldId((int) $this->getId());
575  $fieldprop_obj->setName($prop_name);
576 
577  $value = $originalField->getProperty($prop_name);
578 
579  if (
580  $prop_name == ilDclBaseFieldModel::PROP_REFERENCE &&
581  (
584  )
585  ) {
586  $value = null;
587  }
588 
589  if ($value) {
590  $fieldprop_obj->setValue($value);
591  $fieldprop_obj->create();
592  }
593  }
594  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 544 of file class.ilDclBaseFieldModel.php.

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

544  : void
545  {
546  $original = ilDclCache::getFieldCache($original_id);
547  $this->setTitle($original->getTitle());
548  $this->setDatatypeId($original->getDatatypeId());
549  $this->setDescription($original->getDescription());
550  $this->setOrder($original->getOrder());
551  $this->setExportable($original->getExportable());
552  $this->doCreate();
553  $this->cloneProperties($original);
554 
555  // mandatory for all cloning functions
556  ilDclCache::setCloneOf($original_id, (int) $this->getId(), ilDclCache::TYPE_FIELD);
557  }
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 319 of file class.ilDclBaseFieldModel.php.

References ilDclTable\_tableExists(), addToTableViews(), getDatatypeId(), getDescription(), getId(), getTableId(), getTitle(), setId(), and updateTableFieldSetting().

Referenced by cloneStructure().

319  : void
320  {
321  if (!ilDclTable::_tableExists($this->getTableId())) {
322  throw new ilException("The field does not have a related table!");
323  }
324 
325  $id = $this->db->nextId("il_dcl_field");
326  $this->setId($id);
327  $query = "INSERT INTO il_dcl_field (" . "id" . ", table_id" . ", datatype_id" . ", title" . ", description"
328  . " ) VALUES (" . $this->db->quote($this->getId(), "integer") . "," . $this->db->quote(
329  $this->getTableId(),
330  "integer"
331  ) . ","
332  . $this->db->quote($this->getDatatypeId(), "integer") . "," . $this->db->quote($this->getTitle(), "text") . ","
333  . $this->db->quote($this->getDescription(), "text") . ")";
334  $this->db->manipulate($query);
335 
336  $this->updateTableFieldSetting();
337 
338  $this->addToTableViews();
339  }
addToTableViews()
create ilDclTableViewFieldSettings for this field in each tableview
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 408 of file class.ilDclBaseFieldModel.php.

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

408  : void
409  {
410  // delete tablefield setting.
411  ilDclTableFieldSetting::getInstance($this->getTableId(), $this->getId())->delete();
412 
413  $query = "DELETE FROM il_dcl_field_prop WHERE field_id = " . $this->db->quote($this->getId(), "text");
414  $this->db->manipulate($query);
415 
416  $query = "DELETE FROM il_dcl_field WHERE id = " . $this->db->quote($this->getId(), "text");
417  $this->db->manipulate($query);
418 
419  foreach ($this->getViewSettings() as $field_setting) {
420  $field_setting->delete();
421  }
422  }
static getInstance(int $table_id, string $field)
+ Here is the call graph for this function:

◆ doRead()

ilDclBaseFieldModel::doRead ( )

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

References getId(), loadProperties(), loadTableFieldSetting(), null, setDatatypeId(), setDescription(), setTableId(), and setTitle().

Referenced by __construct().

285  : void
286  {
287  //THEN 1 ELSE 0 END AS has_options FROM il_dcl_field f WHERE id = ".$ilDB->quote($this->getId(),"integer");
288  $query = "SELECT * FROM il_dcl_field WHERE id = " . $this->db->quote($this->getId(), "integer");
289  $set = $this->db->query($query);
290  $rec = $this->db->fetchAssoc($set);
291 
292  if ($rec) {
293  $this->setTableId($rec["table_id"]);
294  if (null !== $rec["title"]) {
295  $this->setTitle($rec["title"]);
296  }
297  if (null !== $rec["description"]) {
298  $this->setDescription($rec["description"]);
299  }
300  $this->setDatatypeId($rec["datatype_id"]);
301  }
302 
303  $this->loadProperties();
304  $this->loadTableFieldSetting();
305  }
loadTableFieldSetting()
loadTableFieldSetting
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
loadProperties()
Get all properties of a field.
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:
+ Here is the caller graph for this function:

◆ doUpdate()

ilDclBaseFieldModel::doUpdate ( )

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

References getDatatypeId(), getDescription(), getId(), getTableId(), getTitle(), updateProperties(), and updateTableFieldSetting().

351  : void
352  {
353  $this->db->update(
354  "il_dcl_field",
355  [
356  "table_id" => [
357  "integer",
358  $this->getTableId(),
359  ],
360  "datatype_id" => [
361  "text",
362  $this->getDatatypeId(),
363  ],
364  "title" => [
365  "text",
366  $this->getTitle(),
367  ],
368  "description" => [
369  "text",
370  $this->getDescription(),
371  ],
372  ],
373  [
374  "id" => [
375  "integer",
376  $this->getId(),
377  ],
378  ]
379  );
380  $this->updateTableFieldSetting();
381  $this->updateProperties();
382  }
updateProperties()
Update properties of this field in Database.
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 720 of file class.ilDclBaseFieldModel.php.

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

720  : void
721  {
722  $worksheet->setCell($row, $col, $this->getTitle());
723  $col++;
724  }
setCell(int $a_row, int $col, $value, ?string $datatype=null, bool $disable_strip_tags_for_strings=false)
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 759 of file class.ilDclBaseFieldModel.php.

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

759  : bool
760  {
761  $values = [
762  'table_id' => $this->getTableId(),
763  'field_id' => $this->getId(),
764  'title' => $this->getTitle(),
765  'datatype' => $this->getDatatypeId(),
766  'description' => $this->getDescription(),
767  ];
768 
769  $properties = $this->getValidFieldProperties();
770  foreach ($properties as $prop) {
771  $values['prop_' . $prop] = $this->getProperty($prop);
772  }
773 
774  $form->setValuesByArray($values);
775 
776  return true;
777  }
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)
getDescription()
Get description.
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 791 of file class.ilDclBaseFieldModel.php.

References ilFormGUI\getFormAction(), ilPropertyFormGUI\getInput(), and ILIAS\Repository\lng().

792  {
793  $ilConfirmationGUI = new ilConfirmationGUI();
794  $ilConfirmationGUI->setFormAction($form->getFormAction());
795  $ilConfirmationGUI->addHiddenItem('confirmed', "1");
796  $ilConfirmationGUI->addHiddenItem('field_id', $form->getInput('field_id'));
797  $ilConfirmationGUI->addHiddenItem('title', $form->getInput('title'));
798  $ilConfirmationGUI->addHiddenItem('description', $form->getInput('description'));
799  $ilConfirmationGUI->addHiddenItem('datatype', $form->getInput('datatype'));
800  $ilConfirmationGUI->setConfirm($this->lng->txt('dcl_update_field'), 'update');
801  $ilConfirmationGUI->setCancel($this->lng->txt('cancel'), 'edit');
802 
803  return $ilConfirmationGUI;
804  }
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:

◆ getDatatype()

ilDclBaseFieldModel::getDatatype ( )

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

References $datatype, and loadDatatype().

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

196  : ilDclDatatype
197  {
198  $this->loadDatatype();
199 
200  return $this->datatype;
201  }
loadDatatype()
Load datatype for model.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDatatypeId()

◆ getDatatypeTitle()

ilDclBaseFieldModel::getDatatypeTitle ( )

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

References loadDatatype().

Referenced by getPresentationDescription(), and getPresentationTitle().

203  : string
204  {
205  $this->loadDatatype();
206  return $this->datatype->getTitle();
207  }
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 169 of file class.ilDclBaseFieldModel.php.

References $description.

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

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

◆ getExportable()

ilDclBaseFieldModel::getExportable ( )
Returns
bool

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

References $exportable, and loadExportability().

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

256  : bool
257  {
258  if (!isset($this->exportable)) {
259  $this->loadExportability();
260  }
261 
262  return $this->exportable;
263  }
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 117 of file class.ilDclBaseFieldModel.php.

References $id.

Referenced by ilDclTable\addField(), ilDclCopyFieldRepresentation\buildFieldCreationInput(), ilDclReferenceFieldRepresentation\buildFieldCreationInput(), checkUnique(), checkUniqueProp(), ilDclTextFieldModel\checkValidityFromForm(), ilDclBooleanFieldModel\checkValidityFromForm(), checkValidityFromForm(), ilDclSelectionFieldModel\cloneProperties(), cloneProperties(), cloneStructure(), doCreate(), ilDclSelectionFieldModel\doDelete(), doDelete(), doRead(), doUpdate(), ilDclStandardField\fillHeaderExcel(), 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(), ilDclDateFieldModel\getRecordQueryFilterObject(), ilDclSelectionFieldModel\getRecordQueryFilterObject(), ilDclIliasReferenceFieldModel\getRecordQueryFilterObject(), ilDclReferenceFieldModel\getRecordQueryFilterObject(), ilDclIliasReferenceFieldModel\getRecordQuerySortObject(), ilDclReferenceFieldModel\getRecordQuerySortObject(), ilDclStandardField\getRecordQuerySortObject(), getRecordQuerySortObject(), ilDclReferenceRecordFieldModel\getReferenceFromValue(), ilDclStandardField\getSortField(), ilDclCopyFieldModel\getValidFieldProperties(), getViewSetting(), getViewSettings(), ilDclStandardField\hasNumericSorting(), loadProperties(), loadTableFieldSetting(), ilDclSelectionFieldModel\setProperty(), setProperty(), ilDclBaseRecordModel\setStandardFieldValueFromExcel(), and updateTableFieldSetting().

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

◆ getOrder()

ilDclBaseFieldModel::getOrder ( )

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

References $order, loadTableFieldSetting(), and null.

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

437  : int
438  {
439  if ($this->order == null) {
440  $this->loadTableFieldSetting();
441  }
442 
443  return !$this->order ? 0 : $this->order;
444  }
loadTableFieldSetting()
loadTableFieldSetting
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPresentationDescription()

ilDclBaseFieldModel::getPresentationDescription ( )

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

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

214  : string
215  {
216  return $this->lng->txt('dcl_' . $this->getDatatypeTitle() . '_desc');
217  }
+ Here is the call graph for this function:

◆ getPresentationTitle()

ilDclBaseFieldModel::getPresentationTitle ( )

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

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

Referenced by ilDclFieldListTableGUI\fillRowFromObject().

209  : string
210  {
211  return $this->lng->txt('dcl_' . $this->getDatatypeTitle());
212  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getProperty()

ilDclBaseFieldModel::getProperty ( string  $key)

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

References getPropertyInstance(), and null.

Referenced by ilDclTextFieldModel\checkRegexAndLength(), checkUnique(), ilDclTextFieldModel\checkValidityFromForm(), cloneProperties(), ilDclTextFieldModel\fillHeaderExcel(), fillPropertiesForm(), ilDclReferenceFieldModel\getFieldRef(), ilDclReferenceFieldModel\getRecordQueryFilterObject(), ilDclReferenceFieldModel\getRecordQuerySortObject(), and ilDclFileFieldModel\getSupportedExtensions().

469  : mixed
470  {
471  $instance = $this->getPropertyInstance($key);
472 
473  return ($instance !== null) ? $instance->getValue() : null;
474  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPropertyInstance()

ilDclBaseFieldModel::getPropertyInstance ( string  $key)

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

References hasProperty(), loadProperties(), and null.

Referenced by getProperty(), and storePropertiesFromForm().

477  {
478  $this->loadProperties();
479  if ($this->hasProperty($key)) {
480  return $this->property[$key];
481  }
482 
483  return null;
484  }
hasProperty(string $key)
Checks if a certain property for a field is set.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
loadProperties()
Get all properties of a field.
+ 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 633 of file class.ilDclBaseFieldModel.php.

References null.

637  return null;
638  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ 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 610 of file class.ilDclBaseFieldModel.php.

References getId().

614  $sql_obj = new ilDclRecordQueryObject();
615 
616  $select_str = "sort_stloc_{$this->getId()}.value AS field_{$this->getId()}";
617  $join_str
618  = "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 = "
619  . $this->db->quote($this->getId(), 'integer') . ") ";
620  $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)";
621 
622  $sql_obj->setSelectStatement($select_str);
623  $sql_obj->setJoinStatement($join_str);
624  $sql_obj->setOrderStatement("field_{$this->getId()} $direction, ID ASC");
625 
626  return $sql_obj;
627  }
+ Here is the call graph for this function:

◆ getSortField()

ilDclBaseFieldModel::getSortField ( )

Returns the sort-field id.

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

References getTitle().

643  : string
644  {
645  return $this->getTitle();
646  }
+ Here is the call graph for this function:

◆ getStorageLocation()

ilDclBaseFieldModel::getStorageLocation ( )

Get storage location for the model.

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

References getStorageLocationOverride(), loadDatatype(), and null.

222  : ?int
223  {
224  if ($this->getStorageLocationOverride() !== null) {
225  return $this->getStorageLocationOverride();
226  }
227 
228  $this->loadDatatype();
229 
230  return $this->datatype->getStorageLocation();
231  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
loadDatatype()
Load datatype for model.
+ Here is the call graph for this function:

◆ getStorageLocationOverride()

ilDclBaseFieldModel::getStorageLocationOverride ( )
Deprecated:

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

References $storage_location_override.

Referenced by getStorageLocation().

707  : ?int
708  {
710  }
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 506 of file class.ilDclBaseFieldModel.php.

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

506  : array
507  {
508  return [];
509  }
+ Here is the caller graph for this function:

◆ getViewSetting()

ilDclBaseFieldModel::getViewSetting ( int  $tableview_id)

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

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

+ Here is the call graph for this function:

◆ getViewSettings()

ilDclBaseFieldModel::getViewSettings ( )
Returns
ilDclTableViewFieldSetting[]

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

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

Referenced by doDelete().

427  : array
428  {
429  return ilDclTableViewFieldSetting::where(['field' => $this->getId()])->get();
430  }
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 651 of file class.ilDclBaseFieldModel.php.

References getDatatypeId(), and ilDclDatatype\INPUTFORMAT_NUMBER.

651  : bool
652  {
654  return true;
655  }
656 
657  return false;
658  }
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 462 of file class.ilDclBaseFieldModel.php.

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

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

462  : bool
463  {
464  $this->loadProperties();
465 
466  return (isset($this->property[$key]) && $this->property[$key]->getValue() != null);
467  }
getValue()
Get the value that is displayed in the input client side.
Definition: Group.php:49
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
loadProperties()
Get all properties of a field.
+ 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 783 of file class.ilDclBaseFieldModel.php.

783  : bool
784  {
785  return false;
786  }

◆ isStandardField()

ilDclBaseFieldModel::isStandardField ( )

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

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

280  : bool
281  {
282  return false;
283  }
+ Here is the caller graph for this function:

◆ loadDatatype()

ilDclBaseFieldModel::loadDatatype ( )
protected

Load datatype for model.

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

References ilDclCache\getDatatype(), and null.

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

236  : void
237  {
238  if ($this->datatype == null) {
239  $this->datatype = ilDclCache::getDatatype($this->datatype_id);
240  }
241  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 268 of file class.ilDclBaseFieldModel.php.

References loadTableFieldSetting(), and null.

Referenced by getExportable().

268  : void
269  {
270  if ($this->exportable == null) {
271  $this->loadTableFieldSetting();
272  }
273  }
loadTableFieldSetting()
loadTableFieldSetting
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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 454 of file class.ilDclBaseFieldModel.php.

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

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

454  : void
455  {
456  $this->property = ilDclCache::getFieldProperties($this->getId());
457  }
static getFieldProperties(string $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 246 of file class.ilDclBaseFieldModel.php.

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

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

246  : void
247  {
248  $tablefield_setting = ilDclTableFieldSetting::getInstance($this->getTableId(), $this->getId());
249  $this->exportable = $tablefield_setting->isExportable();
250  $this->order = $tablefield_setting->getFieldOrder();
251  }
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 ( mixed  $value)
protected

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

Referenced by areEqual().

533  {
534  if (is_string($value)) {
535  $value = trim(preg_replace("/\\s+/uism", " ", $value));
536  }
537 
538  return $value;
539  }
+ Here is the caller graph for this function:

◆ setDatatypeId()

ilDclBaseFieldModel::setDatatypeId ( int  $a_id)

Set datatype id.

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

References null.

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

177  : void
178  {
179  //unset the cached datatype.
180  $this->datatype = null;
181  $this->datatype_id = $a_id;
182  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ setDescription()

ilDclBaseFieldModel::setDescription ( string  $a_desc)

Set description.

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

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

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

◆ setExportable()

ilDclBaseFieldModel::setExportable ( bool  $exportable)

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

References $exportable.

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

596  : void
597  {
598  $this->exportable = $exportable;
599  }
+ Here is the caller graph for this function:

◆ setId()

ilDclBaseFieldModel::setId (   $a_id)

Set field id.

Parameters
int|string

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

Referenced by buildFromDBRecord(), and doCreate().

109  : void
110  {
111  $this->id = (string) $a_id;
112  }
+ Here is the caller graph for this function:

◆ setOrder()

ilDclBaseFieldModel::setOrder ( int  $order)

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

References $order.

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

446  : void
447  {
448  $this->order = $order;
449  }
+ Here is the caller graph for this function:

◆ setProperty()

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

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

References $property, getId(), and loadProperties().

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

487  {
488  $this->loadProperties();
489  if (isset($this->property[$key])) {
490  $this->property[$key]->setValue($value);
491  } else {
493  $property->setName($key);
494  $property->setFieldId((int) $this->getId());
495  $property->setValue($value);
496 
497  $this->property[$key] = $property;
498  }
499 
500  return $this->property[$key];
501  }
loadProperties()
Get all properties of a field.
+ 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 715 of file class.ilDclBaseFieldModel.php.

References $storage_location_override.

715  : void
716  {
717  $this->storage_location_override = $storage_location_override;
718  }
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 125 of file class.ilDclBaseFieldModel.php.

Referenced by buildFromDBRecord(), and doRead().

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

◆ setTitle()

ilDclBaseFieldModel::setTitle ( string  $a_title)

Set title.

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

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

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

◆ storePropertiesFromForm()

ilDclBaseFieldModel::storePropertiesFromForm ( ilPropertyFormGUI  $form)

called when saving the 'edit field' form

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

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

741  : void
742  {
743  $field_props = $this->getValidFieldProperties();
744  $representation = ilDclFieldFactory::getFieldRepresentationInstance($this);
745 
746  foreach ($field_props as $property) {
747  $value = $form->getInput($representation->getPropertyInputFieldId($property));
748 
749  // save non empty values and set them to null, when they already exist. Do not override plugin-hook when already set.
750  if (!empty($value) || ($this->getPropertyInstance($property) != null && $property != self::PROP_PLUGIN_HOOK_NAME)) {
751  $this->setProperty($property, $value)?->store();
752  }
753  }
754  }
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-...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getValidFieldProperties()
Returns all valid properties for a field-type.
setProperty(string $key, $value)
+ Here is the call graph for this function:

◆ toArray()

ilDclBaseFieldModel::toArray ( )

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

275  : array
276  {
277  return (array) $this;
278  }

◆ updateProperties()

ilDclBaseFieldModel::updateProperties ( )

Update properties of this field in Database.

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

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

387  : void
388  {
389  foreach ($this->property as $prop) {
390  $prop->store();
391  }
392  }
+ Here is the caller graph for this function:

◆ updateTableFieldSetting()

ilDclBaseFieldModel::updateTableFieldSetting ( )
protected

update exportable and fieldorder

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

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

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

397  : void
398  {
399  $tablefield_setting = ilDclTableFieldSetting::getInstance($this->getTableId(), $this->getId());
400  $tablefield_setting->setExportable($this->exportable);
401  $tablefield_setting->setFieldOrder($this->getOrder());
402  $tablefield_setting->store();
403  }
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

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

Referenced by getDatatype().

◆ $datatype_id

int ilDclBaseFieldModel::$datatype_id = 0
protected

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

Referenced by getDatatypeId().

◆ $db

ilDBInterface ilDclBaseFieldModel::$db
protected

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

◆ $description

string ilDclBaseFieldModel::$description = ""
protected

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

Referenced by getDescription().

◆ $exportable

bool ilDclBaseFieldModel::$exportable = false
protected

Definition at line 31 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 28 of file class.ilDclBaseFieldModel.php.

Referenced by getOrder(), and setOrder().

◆ $property

array ilDclBaseFieldModel::$property = []
protected

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

Referenced by setProperty().

◆ $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 36 of file class.ilDclBaseFieldModel.php.

Referenced by getStorageLocationOverride(), and setStorageLocationOverride().

◆ $table_id

int ilDclBaseFieldModel::$table_id = 0
protected

◆ $title

string ilDclBaseFieldModel::$title = ""
protected

◆ EDIT_VIEW

const ilDclBaseFieldModel::EDIT_VIEW = 2

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

◆ EXPORTABLE_VIEW

const ilDclBaseFieldModel::EXPORTABLE_VIEW = 4

Definition at line 59 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

const ilDclBaseFieldModel::PROP_ILIAS_REFERENCE_LINK = "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_UNIQUE

◆ PROP_URL

◆ PROP_WIDTH


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