ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilDclNumberFieldRepresentation Class Reference

Class ilDclDateTimeREpresentation. More...

+ Inheritance diagram for ilDclNumberFieldRepresentation:
+ Collaboration diagram for ilDclNumberFieldRepresentation:

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...
 

Protected Member Functions

 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 
- 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...
 

Additional Inherited Members

- 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.ilDclNumberFieldRepresentation.php.

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclNumberFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)

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

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

22  {
23  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_NUMBER_RANGE, false, $this->getField()->getId());
24  $input->setSubmitFormOnEnter(true);
25 
26  $this->setupFilterInputField($input);
27 
28  return $this->getFilterInputFieldValue($input);
29  }
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
const FILTER_NUMBER_RANGE
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
+ Here is the call graph for this function:

◆ buildFieldCreationInput()

ilDclNumberFieldRepresentation::buildFieldCreationInput ( ilObjDataCollection  $dcl,
  $mode = 'create' 
)
protected

Definition at line 45 of file class.ilDclNumberFieldRepresentation.php.

46  {
47  $opt = parent::buildFieldCreationInput($dcl, $mode);
48  return $opt;
49  }

◆ getInputField()

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

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

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

12  {
13  $input = new ilNumberInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
14  // 9 is the maximum number of digits for an integer
15  $input->setMaxLength(9);
16  $input->setInfo($this->lng->txt('dcl_max_digits') . ": 9");
17  $this->setupInputField($input, $this->getField());
18  return $input;
19  }
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
This class represents a number property in a property form.
+ Here is the call graph for this function:

◆ passThroughFilter()

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

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

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

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