ILIAS  release_8 Revision v8.23
ilDclIliasReferenceFieldRepresentation 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 ilDclIliasReferenceFieldRepresentation:
+ Collaboration diagram for ilDclIliasReferenceFieldRepresentation:

Public Member Functions

 getInputField (ilPropertyFormGUI $form, ?int $record_id=null)
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 
- Public Member Functions inherited from ilDclBaseFieldRepresentation
 __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

 buildFieldCreationInput (ilObjDataCollection $dcl, string $mode='create')
 
- Protected Member Functions inherited from ilDclBaseFieldRepresentation
 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...
 

Additional Inherited Members

- Protected Attributes inherited from ilDclBaseFieldRepresentation
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.ilDclIliasReferenceFieldRepresentation.php.

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclIliasReferenceFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)
Returns
string|array|null

Definition at line 37 of file class.ilDclIliasReferenceFieldRepresentation.php.

References ilTable2GUI\addFilterItemByMetaType(), ilTable2GUI\FILTER_TEXT, ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), ILIAS\Survey\Mode\getId(), and ilDclBaseFieldRepresentation\setupFilterInputField().

38  {
39  $input = $table->addFilterItemByMetaType(
40  "filter_" . $this->getField()->getId(),
42  false,
43  $this->getField()->getId()
44  );
45  $input->setSubmitFormOnEnter(true);
46 
47  $this->setupFilterInputField($input);
48 
49  return $this->getFilterInputFieldValue($input);
50  }
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
setupFilterInputField(?ilTableFilterItem $input)
Set basic settings for filter-input-gui.
+ Here is the call graph for this function:

◆ buildFieldCreationInput()

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

Definition at line 66 of file class.ilDclIliasReferenceFieldRepresentation.php.

References ilSubEnabledFormPropertyGUI\addSubItem(), ILIAS\Repository\lng(), ilDclBaseFieldModel\PROP_DISPLAY_COPY_LINK_ACTION_MENU, ilDclBaseFieldModel\PROP_ILIAS_REFERENCE_LINK, and ilDclBaseFieldModel\PROP_LEARNING_PROGRESS.

67  {
68  $opt = parent::buildFieldCreationInput($dcl, $mode);
69 
70  $prop_ref_link = new ilDclCheckboxInputGUI(
71  $this->lng->txt('dcl_learning_progress'),
73  );
74  $opt->addSubItem($prop_ref_link);
75 
76  $prop_multi_select = new ilDclCheckboxInputGUI(
77  $this->lng->txt('dcl_ilias_reference_link'),
79  );
80  $opt->addSubItem($prop_multi_select);
81 
82  $prop_multi_select = new ilDclCheckboxInputGUI(
83  $this->lng->txt('dcl_display_action_menu'),
85  );
86  $opt->addSubItem($prop_multi_select);
87 
88  return $opt;
89  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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:

◆ getInputField()

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

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

References ilDclBaseFieldRepresentation\getField(), ILIAS\Survey\Mode\getId(), and ilDclBaseFieldRepresentation\setupInputField().

22  {
23  $input = new ilRepositorySelector2InputGUI(
24  $this->getField()->getTitle(),
25  'field_' . $this->getField()->getId(),
26  false,
27  $form
28  );
29  $this->setupInputField($input, $this->getField());
30 
31  return $input;
32  }
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
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:

◆ passThroughFilter()

ilDclIliasReferenceFieldRepresentation::passThroughFilter ( ilDclBaseRecordModel  $record,
  $filter 
)
Parameters
string | null$filter

Definition at line 55 of file class.ilDclIliasReferenceFieldRepresentation.php.

References ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilDclBaseFieldRepresentation\getField(), ILIAS\Survey\Mode\getId(), and ilDclBaseRecordModel\getRecordFieldValue().

55  : bool
56  {
57  $value = $record->getRecordFieldValue($this->getField()->getId());
58  $obj_id = ilObject::_lookupObjId($value);
59  if (!$filter || strpos(strtolower(ilObject::_lookupTitle($obj_id)), strtolower($filter)) !== false) {
60  return true;
61  }
62 
63  return false;
64  }
static _lookupObjId(int $ref_id)
getRecordFieldValue(?int $field_id)
Get Field Value.
static _lookupTitle(int $obj_id)
+ Here is the call graph for this function:

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