ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilDclBaseFieldRepresentation Class Reference
+ 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
 
ilObjUser $user
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ilComponentRepository $component_repository
 
ilComponentFactory $component_factory
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilDclBaseFieldRepresentation::__construct ( ilDclBaseFieldModel  $field)

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

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

34  {
35  global $DIC;
36 
37  $this->field = $field;
38  $this->lng = $DIC->language();
39  $this->ctrl = $DIC->ctrl();
40  $this->http = $DIC->http();
41  $this->user = $DIC->user();
42  $this->refinery = $DIC->refinery();
43  $this->component_repository = $DIC["component.repository"];
44  $this->component_factory = $DIC["component.factory"];
45  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26
+ 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(), and null.

137  : void {
138  $opt = $this->buildFieldCreationInput($dcl, $mode);
139  if ($opt !== null) {
140  $form->addOption($opt);
141  }
142  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 52 of file class.ilDclBaseFieldRepresentation.php.

References null.

53  {
54  return null;
55  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ buildFieldCreationInput()

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

Build the creation-input-field.

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

References $info, getField(), and null.

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 class represents an option in a radio group.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$info
Definition: entry_point.php:21
+ 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 ilDclMobFieldRepresentation\addFilterInputFieldToTable(), ilDclTextFieldRepresentation\addFilterInputFieldToTable(), ilDclDateFieldRepresentation\addFilterInputFieldToTable(), ilDclDatetimeFieldRepresentation\addFilterInputFieldToTable(), ilDclBooleanFieldRepresentation\addFilterInputFieldToTable(), ilDclRatingFieldRepresentation\addFilterInputFieldToTable(), ilDclIliasReferenceFieldRepresentation\addFilterInputFieldToTable(), ilDclNumberFieldRepresentation\addFilterInputFieldToTable(), ilDclCopyFieldRepresentation\addFilterInputFieldToTable(), ilDclReferenceFieldRepresentation\addFilterInputFieldToTable(), ilDclMobFieldRepresentation\buildFieldCreationInput(), ilDclCopyFieldRepresentation\buildFieldCreationInput(), buildFieldCreationInput(), ilDclFileFieldRepresentation\getInputField(), ilDclIliasReferenceFieldRepresentation\getInputField(), ilDclBooleanFieldRepresentation\getInputField(), ilDclDateFieldRepresentation\getInputField(), ilDclNumberFieldRepresentation\getInputField(), ilDclRatingFieldRepresentation\getInputField(), ilDclDatetimeFieldRepresentation\getInputField(), ilDclFormulaFieldRepresentation\getInputField(), ilDclReferenceFieldRepresentation\getInputField(), ilDclCopyFieldRepresentation\getInputField(), ilDclTextFieldRepresentation\getInputField(), ilDclMobFieldRepresentation\passThroughFilter(), ilDclTextFieldRepresentation\passThroughFilter(), ilDclDateFieldRepresentation\passThroughFilter(), ilDclDatetimeFieldRepresentation\passThroughFilter(), ilDclRatingFieldRepresentation\passThroughFilter(), ilDclIliasReferenceFieldRepresentation\passThroughFilter(), ilDclBooleanFieldRepresentation\passThroughFilter(), ilDclNumberFieldRepresentation\passThroughFilter(), passThroughFilter(), ilDclCopyFieldRepresentation\passThroughFilter(), ilDclReferenceFieldRepresentation\passThroughFilter(), ilDclFileFieldRepresentation\requiredWorkaroundForInputField(), and setupFilterInputField().

+ Here is the caller graph for this function:

◆ getFilterInputFieldValue()

ilDclBaseFieldRepresentation::getFilterInputFieldValue ( ilTableFilterItem  $input)
protected
Returns
string|array|null

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

References null.

Referenced by ilDclMobFieldRepresentation\addFilterInputFieldToTable(), ilDclTextFieldRepresentation\addFilterInputFieldToTable(), ilDclDateFieldRepresentation\addFilterInputFieldToTable(), ilDclDatetimeFieldRepresentation\addFilterInputFieldToTable(), ilDclRatingFieldRepresentation\addFilterInputFieldToTable(), ilDclBooleanFieldRepresentation\addFilterInputFieldToTable(), ilDclIliasReferenceFieldRepresentation\addFilterInputFieldToTable(), ilDclNumberFieldRepresentation\addFilterInputFieldToTable(), ilDclCopyFieldRepresentation\addFilterInputFieldToTable(), ilDclSelectionFieldRepresentation\addFilterInputFieldToTable(), and ilDclReferenceFieldRepresentation\addFilterInputFieldToTable().

115  {
116  $value = $input->getValue();
117  if (is_array($value)) {
118  if ($value['from'] || $value['to']) {
119  return $value;
120  }
121  } else {
122  if ($value != '') {
123  return $value;
124  }
125  }
126 
127  return null;
128  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getInputField()

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

Returns field-input.

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

References null.

96  {
97  return null;
98  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getPropertyInputFieldId()

ilDclBaseFieldRepresentation::getPropertyInputFieldId ( string  $property)

Return post-var for property-fields.

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

Referenced by ilDclSelectionFieldRepresentation\buildFieldCreationInput(), ilDclIliasReferenceFieldRepresentation\buildFieldCreationInput(), and 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 
)

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

87  : mixed
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 71 of file class.ilDclBaseFieldRepresentation.php.

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

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

◆ setupFilterInputField()

ilDclBaseFieldRepresentation::setupFilterInputField ( ?ilTableFilterItem  $input)
protected

◆ setupInputField()

Field Documentation

◆ $component_factory

ilComponentFactory ilDclBaseFieldRepresentation::$component_factory
protected

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

◆ $component_repository

ilComponentRepository ilDclBaseFieldRepresentation::$component_repository
protected

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

◆ $ctrl

ilCtrl ilDclBaseFieldRepresentation::$ctrl
protected

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

◆ $field

◆ $http

ILIAS HTTP Services ilDclBaseFieldRepresentation::$http
protected

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

◆ $lng

ilLanguage ilDclBaseFieldRepresentation::$lng
protected

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

◆ $refinery

ILIAS Refinery Factory ilDclBaseFieldRepresentation::$refinery
protected

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

◆ $user

ilObjUser ilDclBaseFieldRepresentation::$user
protected

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