ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilDclDatetimeFieldRepresentation Class Reference

Class ilDclDateTimeREpresentation. More...

+ Inheritance diagram for ilDclDatetimeFieldRepresentation:
+ Collaboration diagram for ilDclDatetimeFieldRepresentation:

Public Member Functions

 getInputField (ilPropertyFormGUI $form, $record_id=0)
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 
- Public Member Functions inherited from ilDclBaseFieldRepresentation
 __construct (ilDclBaseFieldModel $field)
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 Add filter input to TableGUI. More...
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 Checks if a filter affects a record. More...
 
 parseSortingValue ($value, $link=true)
 
 getInputField (ilPropertyFormGUI $form, $record_id=0)
 Returns field-input. More...
 
 addFieldCreationForm ($form, ilObjDataCollection $dcl, $mode="create")
 Adds the options for the field-types to the field-creation form. More...
 
 getPropertyInputFieldId ($property)
 Return post-var for property-fields. More...
 
 getField ()
 Return BaseFieldModel. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilDclBaseFieldRepresentation
 setupFilterInputField (ilFormPropertyGUI $input)
 Set basic settings for filter-input-gui. More...
 
 setupInputField (ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
 Sets basic settings on field-input. More...
 
 getFilterInputFieldValue ( $input)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 Build the creation-input-field. More...
 
- Protected Attributes inherited from ilDclBaseFieldRepresentation
 $field
 
 $lng
 
 $ctrl
 

Detailed Description

Class ilDclDateTimeREpresentation.

Author
Michael Herren mh@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
1.0.0

Definition at line 9 of file class.ilDclDatetimeFieldRepresentation.php.

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclDatetimeFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)

Definition at line 18 of file class.ilDclDatetimeFieldRepresentation.php.

References ilTable2GUI\addFilterItemByMetaType(), date, ilTable2GUI\FILTER_DATE_RANGE, ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), and ilDclBaseFieldRepresentation\setupFilterInputField().

18  {
19  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_DATE_RANGE, false, $this->getField()->getId());
20  $input->setSubmitFormOnEnter(true);
21  $input->setStartYear(date("Y") - 100);
22 
23  $this->setupFilterInputField($input);
24 
25  return $this->getFilterInputFieldValue($input);
26  }
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=NULL)
Add filter by standard type.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
+ Here is the call graph for this function:

◆ getInputField()

ilDclDatetimeFieldRepresentation::getInputField ( ilPropertyFormGUI  $form,
  $record_id = 0 
)

Definition at line 11 of file class.ilDclDatetimeFieldRepresentation.php.

References date, ilDclBaseFieldRepresentation\getField(), and ilDclBaseFieldRepresentation\setupInputField().

11  {
12  $input = new ilDateTimeInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
13  $input->setStartYear(date("Y") - 100);
14  $this->setupInputField($input, $this->getField());
15  return $input;
16  }
This class represents a date/time property in a property form.
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
+ Here is the call graph for this function:

◆ passThroughFilter()

ilDclDatetimeFieldRepresentation::passThroughFilter ( ilDclBaseRecordModel  $record,
  $filter 
)

Definition at line 29 of file class.ilDclDatetimeFieldRepresentation.php.

References ilDclBaseFieldRepresentation\getField(), and ilDclBaseRecordModel\getRecordFieldValue().

29  {
30  $value = $record->getRecordFieldValue($this->getField()->getId());
31  if ((!$filter['from'] || $value >= $filter['from']) && (!$filter['to'] || $value <= $filter['to'])) {
32  return true;
33  }
34  return false;
35  }
getRecordFieldValue($field_id)
Get Field Value.
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: