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

Public Member Functions

 __construct (ilDclBaseFieldModel $field)
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 Add filter input to TableGUI. More...
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 Checks if a filter affects a record. More...
 
 parseSortingValue (string $value, bool $link=true)
 
 getInputField (ilPropertyFormGUI $form, ?int $record_id=null)
 Returns field-input. More...
 
 addFieldCreationForm (ilSubEnabledFormPropertyGUI $form, ilObjDataCollection $dcl, string $mode="create")
 Adds the options for the field-types to the field-creation form. More...
 
 getPropertyInputFieldId (string $property)
 Return post-var for property-fields. More...
 
 getField ()
 Return BaseFieldModel. More...
 

Protected Member Functions

 setupFilterInputField (?ilTableFilterItem $input)
 Set basic settings for filter-input-gui. More...
 
 setupInputField (ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
 Sets basic settings on field-input. More...
 
 getFilterInputFieldValue (ilTableFilterItem $input)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, string $mode='create')
 Build the creation-input-field. More...
 

Protected Attributes

ilDclBaseFieldModel $field
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ilComponentRepository $component_repository
 
ilComponentFactory $component_factory
 

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

Constructor & Destructor Documentation

◆ __construct()

ilDclBaseFieldRepresentation::__construct ( ilDclBaseFieldModel  $field)

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

References $DIC, $field, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

31  {
32  global $DIC;
33 
34  $this->field = $field;
35  $this->lng = $DIC->language();
36  $this->ctrl = $DIC->ctrl();
37  $this->http = $DIC->http();
38  $this->refinery = $DIC->refinery();
39  $this->component_repository = $DIC["component.repository"];
40  $this->component_factory = $DIC["component.factory"];
41  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

Member Function Documentation

◆ addFieldCreationForm()

ilDclBaseFieldRepresentation::addFieldCreationForm ( ilSubEnabledFormPropertyGUI  $form,
ilObjDataCollection  $dcl,
string  $mode = "create" 
)

Adds the options for the field-types to the field-creation form.

Definition at line 133 of file class.ilDclBaseFieldRepresentation.php.

References buildFieldCreationInput().

137  : void {
138  $opt = $this->buildFieldCreationInput($dcl, $mode);
139  if ($opt !== null) {
140  $form->addOption($opt);
141  }
142  }
buildFieldCreationInput(ilObjDataCollection $dcl, string $mode='create')
Build the creation-input-field.
+ Here is the call graph for this function:

◆ addFilterInputFieldToTable()

ilDclBaseFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)

Add filter input to TableGUI.

Parameters
ilTable2GUI$table
Returns
null

Definition at line 48 of file class.ilDclBaseFieldRepresentation.php.

49  {
50  return null;
51  }

◆ buildFieldCreationInput()

ilDclBaseFieldRepresentation::buildFieldCreationInput ( ilObjDataCollection  $dcl,
string  $mode = 'create' 
)
protected

Build the creation-input-field.

Definition at line 147 of file class.ilDclBaseFieldRepresentation.php.

References getField().

Referenced by addFieldCreationForm().

147  : ?ilRadioOption
148  {
149  $opt = null;
150  if ($this->getField()->getDatatypeId() !== null) {
151  $title = $this->field->getPresentationTitle();
152  $info = $this->field->getPresentationDescription();
153  $opt = new ilRadioOption($title, (string) $this->getField()->getDatatypeId());
154  $opt->setInfo($info);
155  }
156 
157  return $opt;
158  }
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:

◆ getField()

ilDclBaseFieldRepresentation::getField ( )

Return BaseFieldModel.

Definition at line 171 of file class.ilDclBaseFieldRepresentation.php.

References $field.

Referenced by ilDclTextFieldRepresentation\addFilterInputFieldToTable(), ilDclDatetimeFieldRepresentation\addFilterInputFieldToTable(), ilDclBooleanFieldRepresentation\addFilterInputFieldToTable(), ilDclRatingFieldRepresentation\addFilterInputFieldToTable(), ilDclMobFieldRepresentation\addFilterInputFieldToTable(), ilDclIliasReferenceFieldRepresentation\addFilterInputFieldToTable(), ilDclNumberFieldRepresentation\addFilterInputFieldToTable(), ilDclFileuploadFieldRepresentation\addFilterInputFieldToTable(), ilDclCopyFieldRepresentation\addFilterInputFieldToTable(), ilDclSelectionFieldRepresentation\addFilterInputFieldToTable(), ilDclReferenceFieldRepresentation\addFilterInputFieldToTable(), ilDclSelectionFieldRepresentation\buildFieldCreationInput(), ilDclMobFieldRepresentation\buildFieldCreationInput(), ilDclCopyFieldRepresentation\buildFieldCreationInput(), buildFieldCreationInput(), ilDclFormulaFieldRepresentation\getInputField(), ilDclIliasReferenceFieldRepresentation\getInputField(), ilDclBooleanFieldRepresentation\getInputField(), ilDclMobFieldRepresentation\getInputField(), ilDclDatetimeFieldRepresentation\getInputField(), ilDclNumberFieldRepresentation\getInputField(), ilDclRatingFieldRepresentation\getInputField(), ilDclFileuploadFieldRepresentation\getInputField(), ilDclReferenceFieldRepresentation\getInputField(), ilDclCopyFieldRepresentation\getInputField(), ilDclTextFieldRepresentation\getInputField(), ilDclTextFieldRepresentation\passThroughFilter(), ilDclDatetimeFieldRepresentation\passThroughFilter(), ilDclRatingFieldRepresentation\passThroughFilter(), ilDclMobFieldRepresentation\passThroughFilter(), ilDclIliasReferenceFieldRepresentation\passThroughFilter(), ilDclNumberFieldRepresentation\passThroughFilter(), ilDclBooleanFieldRepresentation\passThroughFilter(), passThroughFilter(), ilDclFileuploadFieldRepresentation\passThroughFilter(), ilDclCopyFieldRepresentation\passThroughFilter(), ilDclReferenceFieldRepresentation\passThroughFilter(), ilDclFileuploadFieldRepresentation\requiredWorkaroundForInputField(), and setupFilterInputField().

172  {
173  return $this->field;
174  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getFilterInputFieldValue()

◆ getInputField()

ilDclBaseFieldRepresentation::getInputField ( ilPropertyFormGUI  $form,
?int  $record_id = null 
)

Returns field-input.

Definition at line 95 of file class.ilDclBaseFieldRepresentation.php.

Referenced by ilDclSelectionFieldRepresentation\buildFieldCreationInput().

96  {
97  return null;
98  }
This class represents a property in a property form.
+ Here is the caller graph for this function:

◆ getPropertyInputFieldId()

ilDclBaseFieldRepresentation::getPropertyInputFieldId ( string  $property)

Return post-var for property-fields.

Definition at line 163 of file class.ilDclBaseFieldRepresentation.php.

Referenced by ilDclTextFieldRepresentation\buildFieldCreationInput().

163  : string
164  {
165  return "prop_" . $property;
166  }
+ Here is the caller graph for this function:

◆ parseSortingValue()

ilDclBaseFieldRepresentation::parseSortingValue ( string  $value,
bool  $link = true 
)
Parameters
mixed$value
Returns
mixed

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

88  {
89  return $value;
90  }

◆ passThroughFilter()

ilDclBaseFieldRepresentation::passThroughFilter ( ilDclBaseRecordModel  $record,
  $filter 
)

Checks if a filter affects a record.

Parameters
int | string | array$filter

Definition at line 67 of file class.ilDclBaseFieldRepresentation.php.

References getField(), ILIAS\Survey\Mode\getId(), and ilDclBaseRecordModel\getRecordFieldValue().

67  : bool
68  {
69  $value = $record->getRecordFieldValue($this->getField()->getId());
70  $pass = true;
71 
72  if (($this->getField()->getId() == "owner" || $this->getField()->getId() == "last_edit_by") && $filter) {
73  $pass = false;
74  $user = new ilObjUser($value);
75  if (strpos($user->getFullname(), $filter) !== false) {
76  $pass = true;
77  }
78  }
79 
80  return $pass;
81  }
getRecordFieldValue(?int $field_id)
Get Field Value.
+ Here is the call graph for this function:

◆ setupFilterInputField()

◆ setupInputField()

Field Documentation

◆ $component_factory

ilComponentFactory ilDclBaseFieldRepresentation::$component_factory
protected

Definition at line 28 of file class.ilDclBaseFieldRepresentation.php.

◆ $component_repository

ilComponentRepository ilDclBaseFieldRepresentation::$component_repository
protected

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

◆ $ctrl

ilCtrl ilDclBaseFieldRepresentation::$ctrl
protected

Definition at line 23 of file class.ilDclBaseFieldRepresentation.php.

◆ $field

◆ $http

ILIAS HTTP Services ilDclBaseFieldRepresentation::$http
protected

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

◆ $lng

ilLanguage ilDclBaseFieldRepresentation::$lng
protected

Definition at line 22 of file class.ilDclBaseFieldRepresentation.php.

◆ $refinery

ILIAS Refinery Factory ilDclBaseFieldRepresentation::$refinery
protected

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


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