ILIAS  release_8 Revision v8.24
class.ilDclIliasReferenceFieldRepresentation.php
Go to the documentation of this file.
1<?php
2
20{
21 public function getInputField(ilPropertyFormGUI $form, ?int $record_id = null): ilRepositorySelector2InputGUI
22 {
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 }
33
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 }
51
55 public function passThroughFilter(ilDclBaseRecordModel $record, $filter): 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 }
65
66 protected function buildFieldCreationInput(ilObjDataCollection $dcl, string $mode = 'create'): ilRadioOption
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 }
90}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
setupFilterInputField(?ilTableFilterItem $input)
Set basic settings for filter-input-gui.
getRecordFieldValue(?int $field_id)
Get Field Value.
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...
getInputField(ilPropertyFormGUI $form, ?int $record_id=null)
Returns field-input.
buildFieldCreationInput(ilObjDataCollection $dcl, string $mode='create')
Build the creation-input-field.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This class represents a property form user interface.
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.