ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDclTextFieldRepresentation Class Reference

Class ilDclTextFieldRepresentation. More...

+ Inheritance diagram for ilDclTextFieldRepresentation:
+ Collaboration diagram for ilDclTextFieldRepresentation:

Public Member Functions

 addFilterInputFieldToTable (ilTable2GUI $table)
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 
 getInputField (ilPropertyFormGUI $form, $record_id=0)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 
- 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

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclTextFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)

Definition at line 15 of file class.ilDclTextFieldRepresentation.php.

References $input, ilTable2GUI\addFilterItemByMetaType(), ilTable2GUI\FILTER_TEXT, ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), and ilDclBaseFieldRepresentation\setupFilterInputField().

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

◆ buildFieldCreationInput()

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

Definition at line 75 of file class.ilDclTextFieldRepresentation.php.

References ilSubEnabledFormPropertyGUI\addSubItem(), ilDclBaseFieldRepresentation\getPropertyInputFieldId(), ilDclBaseFieldModel\PROP_LENGTH, ilDclBaseFieldModel\PROP_LINK_DETAIL_PAGE_TEXT, ilDclBaseFieldModel\PROP_REGEX, ilDclBaseFieldModel\PROP_TEXTAREA, ilDclBaseFieldModel\PROP_URL, ilFormPropertyGUI\setInfo(), and ilNumberInputGUI\setSize().

76  {
77  $opt = parent::buildFieldCreationInput($dcl, $mode);
78 
79  $prop_length = new ilNumberInputGUI($this->lng->txt('dcl_length'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_LENGTH));
80  $prop_length->setSize(5);
81  $prop_length->setMaxValue(4000);
82  $prop_length->setInfo($this->lng->txt('dcl_length_info'));
83 
84  $opt->addSubItem($prop_length);
85 
86  $prop_regex = new ilDclTextInputGUI($this->lng->txt('dcl_regex'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_REGEX));
87  $prop_regex->setInfo($this->lng->txt('dcl_regex_info'));
88 
89  $opt->addSubItem($prop_regex);
90 
91  $prop_url = new ilDclCheckboxInputGUI($this->lng->txt('dcl_url'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_URL));
92  $opt->addSubItem($prop_url);
93 
94  $prop_textarea = new ilDclCheckboxInputGUI($this->lng->txt('dcl_text_area'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_TEXTAREA));
95  $opt->addSubItem($prop_textarea);
96 
97  $prop_page_details = new ilDclCheckboxInputGUI($this->lng->txt('dcl_link_detail_page'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_LINK_DETAIL_PAGE_TEXT));
98  $opt->addSubItem($prop_page_details);
99 
100  return $opt;
101  }
getPropertyInputFieldId($property)
Return post-var for property-fields.
setInfo($a_info)
Set Information Text.
Class ilDclTextInputGUI.
This class represents a number property in a property form.
const PROP_LENGTH
General properties.
setSize($a_size)
Set Size.
Class ilDclCheckboxInputGUI.
+ Here is the call graph for this function:

◆ getInputField()

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

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

References $input, ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldModel\PROP_LENGTH, ilDclBaseFieldModel\PROP_TEXTAREA, ilDclBaseFieldModel\PROP_URL, ilFormPropertyGUI\setInfo(), and ilDclBaseFieldRepresentation\setupInputField().

46  {
47  $input = new ilDclTextInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
48  if ($this->getField()->hasProperty(ilDclBaseFieldModel::PROP_TEXTAREA)) {
49  $input = new ilTextAreaInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
50  }
51 
52  if ($this->getField()->hasProperty(ilDclBaseFieldModel::PROP_LENGTH)) {
53  $input->setInfo($this->lng->txt("dcl_max_text_length") . ": " . $this->getField()->getProperty(ilDclBaseFieldModel::PROP_LENGTH));
54  if (!$this->getField()->getProperty(ilDclBaseFieldModel::PROP_TEXTAREA)) {
55  $input->setMaxLength($this->getField()->getProperty(ilDclBaseFieldModel::PROP_LENGTH));
56  }
57  }
58 
59  if ($this->getField()->hasProperty(ilDclBaseFieldModel::PROP_URL)) {
60  $input->setInfo($this->lng->txt('dcl_text_email_detail_desc'));
61  $title_field = new ilDclTextInputGUI($this->lng->txt('dcl_text_email_title'), 'field_' . $this->getField()->getId() . '_title');
62  $title_field->setInfo($this->lng->txt('dcl_text_email_title_info'));
63  $input->addSubItem($title_field);
64  }
65 
66  $this->setupInputField($input, $this->getField());
67 
68  return $input;
69  }
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
setInfo($a_info)
Set Information Text.
Class ilDclTextInputGUI.
const PROP_LENGTH
General properties.
This class represents a text area property in a property form.
+ Here is the call graph for this function:

◆ passThroughFilter()

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

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

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

30  {
31  $pass = parent::passThroughFilter($record, $filter);
32 
33  $value = $record->getRecordFieldValue($this->getField()->getId());
34  if (!$filter || strpos(strtolower($value), strtolower($filter)) !== false) {
35  $pass = true;
36  }
37 
38  return $pass;
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: