ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilDclDatetimeFieldRepresentation.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 ilDateTimeInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
14 $input->setStartYear(date("Y") - 100);
15 $this->setupInputField($input, $this->getField());
16
17 return $input;
18 }
19
20
22 {
23 $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_DATE_RANGE, false, $this->getField()->getId());
24 $input->setSubmitFormOnEnter(true);
25 $input->setStartYear(date("Y") - 100);
26
27 $this->setupFilterInputField($input);
28
29 return $this->getFilterInputFieldValue($input);
30 }
31
32
33 public function passThroughFilter(ilDclBaseRecordModel $record, $filter)
34 {
35 $value = $record->getRecordFieldValue($this->getField()->getId());
36 if ((!$filter['from'] || $value >= $filter['from']) && (!$filter['to'] || $value <= $filter['to'])) {
37 return true;
38 }
39
40 return false;
41 }
42}
An exception for terminatinating execution or to throw for unit testing.
This class represents a date/time property in a property form.
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.