ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclSelectionFieldRepresentation Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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 (string $value, bool $link=true)
 
 getInputField (ilPropertyFormGUI $form, ?int $record_id=null)
 Returns field-input. More...
 
 addFieldCreationForm (ilSubEnabledFormPropertyGUI $form, ilObjDataCollection $dcl, string $mode="create")
 Adds the options for the field-types to the field-creation form. More...
 
 getPropertyInputFieldId (string $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, string $mode='create')
 
 buildOptionsInput ()
 
- Protected Member Functions inherited from ilDclBaseFieldRepresentation
 setupFilterInputField (?ilTableFilterItem $input)
 Set basic settings for filter-input-gui. More...
 
 setupInputField (ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
 Sets basic settings on field-input. More...
 
 getFilterInputFieldValue (ilTableFilterItem $input)
 
 buildFieldCreationInput (ilObjDataCollection $dcl, string $mode='create')
 Build the creation-input-field. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilDclBaseFieldRepresentation
ilDclBaseFieldModel $field
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ilComponentRepository $component_repository
 
ilComponentFactory $component_factory
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Member Function Documentation

◆ addFilterInputFieldToTable()

ilDclSelectionFieldRepresentation::addFilterInputFieldToTable ( ilTable2GUI  $table)
Parameters
ilTable2GUI$table
Returns
string|array|null

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

References ilTable2GUI\addFilterItemByMetaType(), buildOptionsInput(), ilTable2GUI\FILTER_SELECT, ilDclSelectionOption\getAllForField(), ilDclBaseFieldRepresentation\getField(), ilDclBaseFieldRepresentation\getFilterInputFieldValue(), ILIAS\Survey\Mode\getId(), ILIAS\Repository\lng(), and ilDclBaseFieldRepresentation\setupFilterInputField().

113  {
114  $input = $table->addFilterItemByMetaType(
115  "filter_" . $this->getField()->getId(),
117  false,
118  $this->getField()->getId()
119  );
120 
121  $options = ilDclSelectionOption::getAllForField($this->getField()->getId());
122  $array = array('' => $this->lng->txt('dcl_all_entries'));
123  foreach ($options as $opt) {
124  $array[$opt->getOptId()] = $opt->getValue();
125  }
126 
127  $array['none'] = $this->lng->txt('dcl_no_entry');
128 
129  $input->setOptions($array);
130 
131  $this->setupFilterInputField($input);
132 
133  return $this->getFilterInputFieldValue($input);
134  }
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
static getAllForField(int $field_id)
setupFilterInputField(?ilTableFilterItem $input)
Set basic settings for filter-input-gui.
+ Here is the call graph for this function:

◆ buildFieldCreationInput()

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

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

References ilRadioOption\addSubItem(), buildOptionsInput(), ilDclSelectionOption\getAllForField(), ilDclBaseFieldRepresentation\getField(), ILIAS\Survey\Mode\getId(), ilDclBaseFieldRepresentation\getInputField(), ILIAS\Repository\lng(), ilDclSelectionFieldModel\SELECTION_TYPE_COMBOBOX, ilDclSelectionFieldModel\SELECTION_TYPE_MULTI, ilDclSelectionFieldModel\SELECTION_TYPE_SINGLE, ilFormPropertyGUI\setRequired(), and ilDclBaseFieldRepresentation\setupInputField().

26  {
27  $opt = parent::buildFieldCreationInput($dcl, $mode);
28 
29  $selection_options = $this->buildOptionsInput();
30  $opt->addSubItem($selection_options);
31 
32  $selection_type = new ilRadioGroupInputGUI(
33  $this->lng->txt('dcl_selection_type'),
34  'prop_' . static::PROP_SELECTION_TYPE
35  );
36  $selection_type->setRequired(true);
37 
38  $option_1 = new ilRadioOption(
41  );
42  $selection_type->addOption($option_1);
43 
44  $option_2 = new ilRadioOption(
47  );
48  $selection_type->addOption($option_2);
49 
50  $option_3 = new ilRadioOption(
53  );
54  $selection_type->addOption($option_3);
55 
56  $opt->addSubItem($selection_type);
57 
58  return $opt;
59  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
setRequired(bool $a_required)
+ Here is the call graph for this function:

◆ buildOptionsInput()

ilDclSelectionFieldRepresentation::buildOptionsInput ( )
abstractprotected

Referenced by addFilterInputFieldToTable(), and buildFieldCreationInput().

+ Here is the caller graph for this function:

Field Documentation

◆ PROP_SELECTION_OPTIONS

const ilDclSelectionFieldRepresentation::PROP_SELECTION_OPTIONS = ''

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

◆ PROP_SELECTION_TYPE

const ilDclSelectionFieldRepresentation::PROP_SELECTION_TYPE = ''

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


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