ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilDclBooleanFieldRepresentation.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 ilDclCheckboxInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
14 $this->setupInputField($input, $this->getField());
15
16 return $input;
17 }
18
19
21 {
22 $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_SELECT, false, $this->getField()->getId());
23 $input->setOptions(
24 array(
25 "" => $this->lng->txt("dcl_any"),
26 "not_checked" => $this->lng->txt("dcl_not_checked"),
27 "checked" => $this->lng->txt("dcl_checked"),
28 )
29 );
30
31 $this->setupFilterInputField($input);
32
33 return $this->getFilterInputFieldValue($input);
34 }
35
36
37 public function passThroughFilter(ilDclBaseRecordModel $record, $filter)
38 {
39 $value = $record->getRecordFieldValue($this->getField()->getId());
40 if ((($filter == "checked" && $value == 1) || ($filter == "not_checked" && $value == 0)) || $filter == '' || !$filter) {
41 return true;
42 }
43
44 return false;
45 }
46}
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.
Class ilDclFileuploadFieldRepresentaion.
addFilterInputFieldToTable(ilTable2GUI $table)
Add filter input to TableGUI.
getInputField(ilPropertyFormGUI $form, $record_id=0)
Returns field-input.
passThroughFilter(ilDclBaseRecordModel $record, $filter)
Checks if a filter affects a record.
Class ilDclCheckboxInputGUI.
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.