ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
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 }
This class represents a property form user interface.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
This class represents a date/time property in a property form.
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
Class ilTable2GUI.
if(isset($_POST['submit'])) $form
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
Class ilDclBaseRecordModel.
getRecordFieldValue($field_id)
Get Field Value.
getInputField(ilPropertyFormGUI $form, $record_id=0)
if(empty($password)) $table
Definition: pwgen.php:24
passThroughFilter(ilDclBaseRecordModel $record, $filter)
Class ilDclBaseFieldRepresentation.