ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 14 of file class.ilDclTextFieldRepresentation.php.

14 {
15 $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_TEXT, false, $this->getField()->getId());
16 $input->setSubmitFormOnEnter(true);
17
18 $this->setupFilterInputField($input);
19
20 return $this->getFilterInputFieldValue($input);
21 }
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 72 of file class.ilDclTextFieldRepresentation.php.

72 {
73 $opt = parent::buildFieldCreationInput($dcl, $mode);
74
75 $prop_length = new ilNumberInputGUI($this->lng->txt('dcl_length'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_LENGTH));
76 $prop_length->setSize(5);
77 $prop_length->setMaxValue(4000);
78 $prop_length->setInfo($this->lng->txt('dcl_length_info'));
79
80 $opt->addSubItem($prop_length);
81
82 $prop_regex = new ilDclTextInputGUI($this->lng->txt('dcl_regex'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_REGEX));
83 $prop_regex->setInfo($this->lng->txt('dcl_regex_info'));
84
85 $opt->addSubItem($prop_regex);
86
87 $prop_url = new ilDclCheckboxInputGUI($this->lng->txt('dcl_url'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_URL));
88 $opt->addSubItem($prop_url);
89
90 $prop_textarea = new ilDclCheckboxInputGUI($this->lng->txt('dcl_text_area'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_TEXTAREA));
91 $opt->addSubItem($prop_textarea);
92
93 $prop_page_details = new ilDclCheckboxInputGUI($this->lng->txt('dcl_link_detail_page'), $this->getPropertyInputFieldId(ilDclBaseFieldModel::PROP_LINK_DETAIL_PAGE_TEXT));
94 $opt->addSubItem($prop_page_details);
95
96 return $opt;
97 }
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 42 of file class.ilDclTextFieldRepresentation.php.

42 {
43 $input = new ilDclTextInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
44 if ($this->getField()->hasProperty(ilDclBaseFieldModel::PROP_TEXTAREA)) {
45 $input = new ilTextAreaInputGUI($this->getField()->getTitle(), 'field_' . $this->getField()->getId());
46 }
47
48
49 if ($this->getField()->hasProperty(ilDclBaseFieldModel::PROP_LENGTH)) {
50 $input->setInfo($this->lng->txt("dcl_max_text_length") . ": " . $this->getField()->getProperty(ilDclBaseFieldModel::PROP_LENGTH));
51 if (!$this->getField()->getProperty(ilDclBaseFieldModel::PROP_TEXTAREA)) {
52 $input->setMaxLength($this->getField()->getProperty(ilDclBaseFieldModel::PROP_LENGTH));
53 }
54 }
55
56 if ($this->getField()->hasProperty(ilDclBaseFieldModel::PROP_URL)) {
57 $input->setInfo($this->lng->txt('dcl_text_email_detail_desc'));
58 $title_field = new ilDclTextInputGUI($this->lng->txt('dcl_text_email_title'), 'field_' . $this->getField()->getId() . '_title');
59 $title_field->setInfo($this->lng->txt('dcl_text_email_title_info'));
60 $input->addSubItem($title_field);
61 }
62
63 $this->setupInputField($input, $this->getField());
64
65 return $input;
66 }
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 27 of file class.ilDclTextFieldRepresentation.php.

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