ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilDclTextFieldRepresentation Class Reference

Class ilDclTextFieldRepresentation. More...

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

Public Member Functions

 addFilterInputFieldToTable (ilTable2GUI $table)
 Add filter input to TableGUI.
Parameters
ilTable2GUI$table
Returns
null
More...
 
 passThroughFilter (ilDclBaseRecordModel $record, $filter)
 Checks if a filter affects a record.
Parameters
ilDclBaseRecordModel$record
$filter
Returns
bool
More...
 
 getInputField (ilPropertyFormGUI $form, $record_id=0)
 Returns field-input.
Parameters
ilPropertyFormGUI$form
int$record_id
Returns
null
More...
 
 buildFieldCreationInput (ilObjDataCollection $dcl, $mode='create')
 @inheritDoc More...
 
- 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)

Add filter input to TableGUI.

Parameters
ilTable2GUI$table
Returns
null

Reimplemented from ilDclBaseFieldRepresentation.

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

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

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

+ Here is the call graph for this function:

◆ buildFieldCreationInput()

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

@inheritDoc

Reimplemented from ilDclBaseFieldRepresentation.

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

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 }
const PROP_LENGTH
General properties.
Class ilDclCheckboxInputGUI.
Class ilDclTextInputGUI.
This class represents a number property in a property form.

References ilDclBaseFieldModel\PROP_LENGTH, ilDclBaseFieldModel\PROP_LINK_DETAIL_PAGE_TEXT, ilDclBaseFieldModel\PROP_REGEX, ilDclBaseFieldModel\PROP_TEXTAREA, and ilDclBaseFieldModel\PROP_URL.

◆ getInputField()

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

Returns field-input.

Parameters
ilPropertyFormGUI$form
int$record_id
Returns
null

Reimplemented from ilDclBaseFieldRepresentation.

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

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.
This class represents a text area property in a property form.

References ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldModel\PROP_LENGTH, ilDclBaseFieldModel\PROP_TEXTAREA, ilDclBaseFieldModel\PROP_URL, and ilDclBaseFieldRepresentation\setupInputField().

+ Here is the call graph for this function:

◆ passThroughFilter()

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

Checks if a filter affects a record.

Parameters
ilDclBaseRecordModel$record
$filter
Returns
bool

Reimplemented from ilDclBaseFieldRepresentation.

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

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.

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

+ Here is the call graph for this function:

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