ILIAS  release_7 Revision v7.30-3-g800a261c036
ilDclSelectionFieldRepresentation Class Reference

Class ilDclSelectionFieldRepresentation. More...

+ Inheritance diagram for ilDclSelectionFieldRepresentation:
+ Collaboration diagram for ilDclSelectionFieldRepresentation:

Public Member Functions

 addFilterInputFieldToTable (ilTable2GUI $table)
 
- 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...
 

Data Fields

const PROP_SELECTION_TYPE = ''
 
const PROP_SELECTION_OPTIONS = ''
 

Protected Member Functions

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

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclSelectionFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)
Parameters
ilTable2GUI$table
Returns
null

Reimplemented from ilDclBaseFieldRepresentation.

Definition at line 112 of file class.ilDclSelectionFieldRepresentation.php.

113 {
114 $input = $table->addFilterItemByMetaType("filter_" . $this->getField()->getId(), ilTable2GUI::FILTER_SELECT, false, $this->getField()->getId());
115
116 $options = ilDclSelectionOption::getAllForField($this->getField()->getId());
117 $array = array('' => $this->lng->txt('dcl_all_entries'));
118 foreach ($options as $opt) {
119 $array[$opt->getOptId()] = $opt->getValue();
120 }
121
122 $array['none'] = $this->lng->txt('dcl_no_entry');
123
124 $input->setOptions($array);
125
126 $this->setupFilterInputField($input);
127
128 return $this->getFilterInputFieldValue($input);
129 }
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_SELECT, ilDclSelectionOption\getAllForField(), ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), and ilDclBaseFieldRepresentation\setupFilterInputField().

+ Here is the call graph for this function:

◆ buildFieldCreationInput()

ilDclSelectionFieldRepresentation::buildFieldCreationInput ( ilObjDataCollection  $dcl,
  $mode = 'create' 
)
protected
Parameters
ilObjDataCollection$dcl
string$mode
Returns
ilPropertyFormGUI

Reimplemented from ilDclBaseFieldRepresentation.

Definition at line 23 of file class.ilDclSelectionFieldRepresentation.php.

24 {
25 $opt = parent::buildFieldCreationInput($dcl, $mode);
26
27 $selection_options = $this->buildOptionsInput();
28 $opt->addSubItem($selection_options);
29
30 $selection_type = new ilRadioGroupInputGUI($this->lng->txt('dcl_selection_type'), 'prop_' . static::PROP_SELECTION_TYPE);
31 $selection_type->setRequired(true);
32
33 $option_1 = new ilRadioOption(
36 );
37 $selection_type->addOption($option_1);
38
39 $option_2 = new ilRadioOption(
40 $this->lng->txt('dcl_' . ilDclSelectionFieldModel::SELECTION_TYPE_MULTI),
42 );
43 $selection_type->addOption($option_2);
44
45 $option_3 = new ilRadioOption(
48 );
49 $selection_type->addOption($option_3);
50
51 $opt->addSubItem($selection_type);
52
53 return $opt;
54 }
This class represents a property in a property form.
This class represents an option in a radio group.

References buildOptionsInput(), ilDclSelectionFieldModel\SELECTION_TYPE_COMBOBOX, ilDclSelectionFieldModel\SELECTION_TYPE_MULTI, and ilDclSelectionFieldModel\SELECTION_TYPE_SINGLE.

+ Here is the call graph for this function:

◆ buildOptionsInput()

ilDclSelectionFieldRepresentation::buildOptionsInput ( )
abstractprotected
Returns
mixed

Reimplemented in ilDclDateSelectionFieldRepresentation, and ilDclTextSelectionFieldRepresentation.

Referenced by buildFieldCreationInput().

+ Here is the caller graph for this function:

Field Documentation

◆ PROP_SELECTION_OPTIONS

const ilDclSelectionFieldRepresentation::PROP_SELECTION_OPTIONS = ''

Definition at line 14 of file class.ilDclSelectionFieldRepresentation.php.

◆ PROP_SELECTION_TYPE

const ilDclSelectionFieldRepresentation::PROP_SELECTION_TYPE = ''

Definition at line 13 of file class.ilDclSelectionFieldRepresentation.php.


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