ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDclDatetimeFieldRepresentation Class Reference
+ Inheritance diagram for ilDclDatetimeFieldRepresentation:
+ Collaboration diagram for ilDclDatetimeFieldRepresentation:

Public Member Functions

 getInputField (ilPropertyFormGUI $form, ?int $record_id=null)
 Returns field-input. More...
 
 addFilterInputFieldToTable (ilTable2GUI $table)
 Add filter input to TableGUI. More...
 
 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 (string $value, bool $link=true)
 
 getInputField (ilPropertyFormGUI $form, ?int $record_id=null)
 Returns field-input. More...
 
 addFieldCreationForm (ilSubEnabledFormPropertyGUI $form, ilObjDataCollection $dcl, string $mode="create")
 Adds the options for the field-types to the field-creation form. More...
 
 getPropertyInputFieldId (string $property)
 Return post-var for property-fields. More...
 
 getField ()
 Return BaseFieldModel. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilDclBaseFieldRepresentation
 setupFilterInputField (?ilTableFilterItem $input)
 Set basic settings for filter-input-gui. More...
 
 setupInputField (ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
 Sets basic settings on field-input. More...
 
 getFilterInputFieldValue (ilTableFilterItem $input)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, string $mode='create')
 Build the creation-input-field. More...
 
- Protected Attributes inherited from ilDclBaseFieldRepresentation
ilDclBaseFieldModel $field
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilObjUser $user
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ilComponentRepository $component_repository
 
ilComponentFactory $component_factory
 

Detailed Description

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

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclDatetimeFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)

Add filter input to TableGUI.

Parameters
ilTable2GUI$table
Returns
null

Reimplemented from ilDclBaseFieldRepresentation.

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

32 : ?array
33 {
34 $input = $table->addFilterItemByMetaType(
35 "filter_" . $this->getField()->getId(),
37 false,
38 $this->getField()->getId()
39 );
40 $input->setSubmitFormOnEnter(true);
41
42 $this->setupFilterInputField($input);
43
44 return $this->getFilterInputFieldValue($input);
45 }
setupFilterInputField(?ilTableFilterItem $input)
Set basic settings for filter-input-gui.
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
const FILTER_DATETIME_RANGE

References ilTable2GUI\addFilterItemByMetaType(), ilTable2GUI\FILTER_DATETIME_RANGE, ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), ILIAS\Survey\Mode\getId(), and ilDclBaseFieldRepresentation\setupFilterInputField().

+ Here is the call graph for this function:

◆ getInputField()

ilDclDatetimeFieldRepresentation::getInputField ( ilPropertyFormGUI  $form,
?int  $record_id = null 
)

Returns field-input.

Reimplemented from ilDclBaseFieldRepresentation.

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

24 {
25 $input = new ilDateTimeInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
26 $input->setShowTime(true);
27 $this->setupInputField($input, $this->getField());
28
29 return $input;
30 }
This class represents a date/time property in a property form.
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.

References ilDclBaseFieldRepresentation\getField(), ILIAS\Survey\Mode\getId(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), and ilDclBaseFieldRepresentation\setupInputField().

+ Here is the call graph for this function:

◆ passThroughFilter()

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

Reimplemented from ilDclBaseFieldRepresentation.

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

50 : bool
51 {
52 $value = $record->getRecordFieldValue($this->getField()->getId());
53 if ((!$filter['from'] || $value >= $filter['from']) && (!$filter['to'] || $value <= $filter['to'])) {
54 return true;
55 }
56
57 return false;
58 }
getRecordFieldValue(?string $field_id)
Get Field Value.

References ilDclBaseFieldRepresentation\getField(), ILIAS\Survey\Mode\getId(), and ilDclBaseRecordModel\getRecordFieldValue().

+ Here is the call graph for this function:

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