ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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
 
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 32 of file class.ilDclBaseFieldRepresentation.php.

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

33  {
34  global $DIC;
35 
36  $this->field = $field;
37  $this->lng = $DIC->language();
38  $this->ctrl = $DIC->ctrl();
39  $this->http = $DIC->http();
40  $this->refinery = $DIC->refinery();
41  $this->component_repository = $DIC["component.repository"];
42  $this->component_factory = $DIC["component.factory"];
43  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
+ 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 131 of file class.ilDclBaseFieldRepresentation.php.

References buildFieldCreationInput(), and null.

135  : void {
136  $opt = $this->buildFieldCreationInput($dcl, $mode);
137  if ($opt !== null) {
138  $form->addOption($opt);
139  }
140  }
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 50 of file class.ilDclBaseFieldRepresentation.php.

References null.

51  {
52  return null;
53  }
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 145 of file class.ilDclBaseFieldRepresentation.php.

References getField(), and null.

Referenced by addFieldCreationForm().

145  : ?ilRadioOption
146  {
147  $opt = null;
148  if ($this->getField()->getDatatypeId() !== null) {
149  $title = $this->field->getPresentationTitle();
150  $info = $this->field->getPresentationDescription();
151  $opt = new ilRadioOption($title, (string) $this->getField()->getDatatypeId());
152  $opt->setInfo($info);
153  }
154 
155  return $opt;
156  }
This class represents an option in a radio group.
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:

◆ getField()

ilDclBaseFieldRepresentation::getField ( )

Return BaseFieldModel.

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

References $field.

Referenced by ilDclMobFieldRepresentation\addFilterInputFieldToTable(), ilDclTextFieldRepresentation\addFilterInputFieldToTable(), ilDclDatetimeFieldRepresentation\addFilterInputFieldToTable(), ilDclBooleanFieldRepresentation\addFilterInputFieldToTable(), ilDclRatingFieldRepresentation\addFilterInputFieldToTable(), ilDclIliasReferenceFieldRepresentation\addFilterInputFieldToTable(), ilDclNumberFieldRepresentation\addFilterInputFieldToTable(), ilDclCopyFieldRepresentation\addFilterInputFieldToTable(), ilDclSelectionFieldRepresentation\addFilterInputFieldToTable(), ilDclReferenceFieldRepresentation\addFilterInputFieldToTable(), ilDclSelectionFieldRepresentation\buildFieldCreationInput(), ilDclMobFieldRepresentation\buildFieldCreationInput(), ilDclCopyFieldRepresentation\buildFieldCreationInput(), buildFieldCreationInput(), ilDclBooleanFieldRepresentation\getInputField(), ilDclDatetimeFieldRepresentation\getInputField(), ilDclNumberFieldRepresentation\getInputField(), ilDclIliasReferenceFieldRepresentation\getInputField(), ilDclRatingFieldRepresentation\getInputField(), ilDclFileFieldRepresentation\getInputField(), ilDclFormulaFieldRepresentation\getInputField(), ilDclReferenceFieldRepresentation\getInputField(), ilDclCopyFieldRepresentation\getInputField(), ilDclTextFieldRepresentation\getInputField(), ilDclMobFieldRepresentation\passThroughFilter(), ilDclTextFieldRepresentation\passThroughFilter(), ilDclDatetimeFieldRepresentation\passThroughFilter(), ilDclRatingFieldRepresentation\passThroughFilter(), ilDclNumberFieldRepresentation\passThroughFilter(), ilDclBooleanFieldRepresentation\passThroughFilter(), ilDclIliasReferenceFieldRepresentation\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 111 of file class.ilDclBaseFieldRepresentation.php.

References null.

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

113  {
114  $value = $input->getValue();
115  if (is_array($value)) {
116  if ($value['from'] || $value['to']) {
117  return $value;
118  }
119  } else {
120  if ($value != '') {
121  return $value;
122  }
123  }
124 
125  return null;
126  }
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 93 of file class.ilDclBaseFieldRepresentation.php.

References null.

Referenced by ilDclSelectionFieldRepresentation\buildFieldCreationInput().

94  {
95  return null;
96  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getPropertyInputFieldId()

ilDclBaseFieldRepresentation::getPropertyInputFieldId ( string  $property)

Return post-var for property-fields.

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

Referenced by ilDclTextFieldRepresentation\buildFieldCreationInput().

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

◆ parseSortingValue()

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

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

85  : mixed
86  {
87  return $value;
88  }

◆ passThroughFilter()

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

Checks if a filter affects a record.

Parameters
int | string | array$filter

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

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

69  : bool
70  {
71  $value = $record->getRecordFieldValue($this->getField()->getId());
72  $pass = true;
73 
74  if (($this->getField()->getId() == "owner" || $this->getField()->getId() == "last_edit_by") && $filter) {
75  $pass = false;
76  $user = new ilObjUser($value);
77  if (strpos($user->getFullname(), $filter) !== false) {
78  $pass = true;
79  }
80  }
81 
82  return $pass;
83  }
getRecordFieldValue(?string $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 30 of file class.ilDclBaseFieldRepresentation.php.

◆ $component_repository

ilComponentRepository ilDclBaseFieldRepresentation::$component_repository
protected

Definition at line 29 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 26 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 27 of file class.ilDclBaseFieldRepresentation.php.


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