ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilDclIliasReferenceFieldRepresentation.php
Go to the documentation of this file.
1 <?php
2 
10 {
11  public function getInputField(ilPropertyFormGUI $form, $record_id = 0)
12  {
13  $input = new ilRepositorySelector2InputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId(), false, get_class($form));
14  $this->setupInputField($input, $this->getField());
15 
16  return $input;
17  }
18 
19 
21  {
22  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_TEXT, false, $this->getField()->getId());
23  $input->setSubmitFormOnEnter(true);
24 
26 
27  return $this->getFilterInputFieldValue($input);
28  }
29 
30 
31  public function passThroughFilter(ilDclBaseRecordModel $record, $filter)
32  {
33  $value = $record->getRecordFieldValue($this->getField()->getId());
34  $obj_id = ilObject::_lookupObjId($value);
35  if (!$filter || strpos(strtolower(ilObject::_lookupTitle($obj_id)), strtolower($filter)) !== false) {
36  return true;
37  }
38 
39  return false;
40  }
41 
42 
46  public function buildFieldCreationInput(ilObjDataCollection $dcl, $mode = 'create')
47  {
48  $opt = parent::buildFieldCreationInput($dcl, $mode);
49 
50  $prop_ref_link = new ilDclCheckboxInputGUI($this->lng->txt('dcl_learning_progress'), 'prop_' . ilDclBaseFieldModel::PROP_LEARNING_PROGRESS);
51  $opt->addSubItem($prop_ref_link);
52 
53  $prop_multi_select = new ilDclCheckboxInputGUI($this->lng->txt('dcl_ilias_reference_link'), 'prop_' . ilDclBaseFieldModel::PROP_ILIAS_REFERENCE_LINK);
54  $opt->addSubItem($prop_multi_select);
55 
56  $prop_multi_select = new ilDclCheckboxInputGUI($this->lng->txt('dcl_display_action_menu'), 'prop_' . ilDclBaseFieldModel::PROP_DISPLAY_COPY_LINK_ACTION_MENU);
57  $opt->addSubItem($prop_multi_select);
58 
59  return $opt;
60  }
61 }
buildFieldCreationInput(ilObjDataCollection $dcl, $mode='create')
This class represents a property form user interface.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
static _lookupTitle($a_id)
lookup object title
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
Class ilTable2GUI.
if(isset($_POST['submit'])) $form
static _lookupObjId($a_id)
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
Class ilDclBaseRecordModel.
getRecordFieldValue($field_id)
Get Field Value.
Class ilDclCheckboxInputGUI.
if(empty($password)) $table
Definition: pwgen.php:24
Class ilDclBaseFieldRepresentation.
Class ilObjDataCollection.