ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilDclNumberFieldRepresentation.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 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 
19  return $input;
20  }
21 
22 
24  {
25  $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_NUMBER_RANGE, false, $this->getField()->getId());
26  $input->setSubmitFormOnEnter(true);
27 
29 
30  return $this->getFilterInputFieldValue($input);
31  }
32 
33 
34  public function passThroughFilter(ilDclBaseRecordModel $record, $filter)
35  {
36  $value = $record->getRecordFieldValue($this->getField()->getId());
37  if ((!$filter['from'] || $value >= $filter['from']) && (!$filter['to'] || $value <= $filter['to'])) {
38  return true;
39  }
40 
41  return false;
42  }
43 
44 
48  protected function buildFieldCreationInput(ilObjDataCollection $dcl, $mode = 'create')
49  {
50  $opt = parent::buildFieldCreationInput($dcl, $mode);
51 
52  return $opt;
53  }
54 }
This class represents a property form user interface.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
getInputField(ilPropertyFormGUI $form, $record_id=0)
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
buildFieldCreationInput(ilObjDataCollection $dcl, $mode='create')
Class ilTable2GUI.
if(isset($_POST['submit'])) $form
This class represents a number property in a property form.
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
Class ilDclBaseRecordModel.
getRecordFieldValue($field_id)
Get Field Value.
passThroughFilter(ilDclBaseRecordModel $record, $filter)
if(empty($password)) $table
Definition: pwgen.php:24
Class ilDclBaseFieldRepresentation.
Class ilObjDataCollection.