ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilDclIliasReferenceFieldRepresentation.php
Go to the documentation of this file.
1 <?php
2 
3 
11 {
12  public function getInputField(ilPropertyFormGUI $form, $record_id = 0)
13  {
14  $input = new ilRepositorySelector2InputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId(), false, get_class($form));
15  $this->setupInputField($input, $this->getField());
16 
17  return $input;
18  }
19 
21  {
22  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_TEXT, false, $this->getField()->getId());
23  $input->setSubmitFormOnEnter(true);
24 
25  $this->setupFilterInputField($input);
26  return $this->getFilterInputFieldValue($input);
27  }
28 
29 
30  public function passThroughFilter(ilDclBaseRecordModel $record, $filter)
31  {
32  $value = $record->getRecordFieldValue($this->getField()->getId());
33  $obj_id = ilObject::_lookupObjId($value);
34  if (!$filter || strpos(strtolower(ilObject::_lookupTitle($obj_id)), strtolower($filter)) !== false) {
35  return true;
36  }
37  return false;
38  }
39 
43  public function buildFieldCreationInput(ilObjDataCollection $dcl, $mode = 'create')
44  {
45  $opt = parent::buildFieldCreationInput($dcl, $mode);
46 
47  $prop_ref_link = new ilDclCheckboxInputGUI($this->lng->txt('dcl_learning_progress'), 'prop_' . ilDclBaseFieldModel::PROP_LEARNING_PROGRESS);
48  $opt->addSubItem($prop_ref_link);
49 
50  $prop_multi_select = new ilDclCheckboxInputGUI($this->lng->txt('dcl_ilias_reference_link'), 'prop_' . ilDclBaseFieldModel::PROP_ILIAS_REFERENCE_LINK);
51  $opt->addSubItem($prop_multi_select);
52 
53  $prop_multi_select = new ilDclCheckboxInputGUI($this->lng->txt('dcl_display_action_menu'), 'prop_' . ilDclBaseFieldModel::PROP_DISPLAY_COPY_LINK_ACTION_MENU);
54  $opt->addSubItem($prop_multi_select);
55 
56  return $opt;
57  }
58 }
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.