ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 8 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().

19  {
20  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_DATE_RANGE, false, $this->getField()->getId());
21  $input->setSubmitFormOnEnter(true);
22  $input->setStartYear(date("Y") - 100);
23 
24  $this->setupFilterInputField($input);
25 
26  return $this->getFilterInputFieldValue($input);
27  }
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 10 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 30 of file class.ilDclDatetimeFieldRepresentation.php.

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

31  {
32  $value = $record->getRecordFieldValue($this->getField()->getId());
33  if ((!$filter['from'] || $value >= $filter['from']) && (!$filter['to'] || $value <= $filter['to'])) {
34  return true;
35  }
36  return false;
37  }
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: