ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilDclRatingFieldRepresentation.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 ilTextInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
14 $input->setValue($this->lng->txt("dcl_editable_in_table_gui"));
15 $input->setDisabled(true);
16 $this->setupInputField($input, $this->getField());
17
18 return $input;
19 }
20
21
23 {
24 $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_SELECT, false, $this->getField()->getId());
25 $options = array("" => $this->lng->txt("dcl_any"), 1 => ">1", 2 => ">2", 3 => ">3", 4 => ">4", 5 => "5");
26 $input->setOptions($options);
27
28 $this->setupFilterInputField($input);
29
30 return $this->getFilterInputFieldValue($input);
31 }
32
33
34 public function passThroughFilter(ilDclBaseRecordModel $record, $filter)
35 {
36 $value = $record->getRecordFieldValue($this->getField()->getId());
37 if (!$filter || $filter <= $value['avg']) {
38 return true;
39 }
40
41 return false;
42 }
43}
An exception for terminatinating execution or to throw for unit testing.
Class ilDclBaseFieldRepresentation.
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
Class ilDclBaseRecordModel.
getRecordFieldValue($field_id)
Get Field Value.
getInputField(ilPropertyFormGUI $form, $record_id=0)
Returns field-input.
addFilterInputFieldToTable(ilTable2GUI $table)
Add filter input to TableGUI.
passThroughFilter(ilDclBaseRecordModel $record, $filter)
Checks if a filter affects a record.
This class represents a property form user interface.
Class ilTable2GUI.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
This class represents a text property in a property form.