ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDclSelectionFieldRepresentation Class Reference
+ 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

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

Member Function Documentation

◆ addFilterInputFieldToTable()

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

Definition at line 106 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().

107  {
108  $input = $table->addFilterItemByMetaType(
109  "filter_" . $this->getField()->getId(),
111  false,
112  $this->getField()->getId()
113  );
114 
115  $options = ilDclSelectionOption::getAllForField((int) $this->getField()->getId());
116  $array = ['' => $this->lng->txt('dcl_all_entries')];
117  foreach ($options as $opt) {
118  $array[$opt->getOptId()] = $opt->getValue();
119  }
120 
121  $array['none'] = $this->lng->txt('dcl_no_entry');
122 
123  $input->setOptions($array);
124 
125  $this->setupFilterInputField($input);
126 
127  return $this->getFilterInputFieldValue($input);
128  }
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 27 of file class.ilDclSelectionFieldRepresentation.php.

References buildOptionsInput(), ilDclSelectionOption\getAllForField(), ilDclBaseFieldRepresentation\getField(), ILIAS\Survey\Mode\getId(), ilDclBaseFieldRepresentation\getInputField(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), ILIAS\Repository\lng(), null, ilDclSelectionFieldModel\SELECTION_TYPE_COMBOBOX, ilDclSelectionFieldModel\SELECTION_TYPE_MULTI, ilDclSelectionFieldModel\SELECTION_TYPE_SINGLE, ilFormPropertyGUI\setRequired(), and ilDclBaseFieldRepresentation\setupInputField().

28  {
29  $opt = parent::buildFieldCreationInput($dcl, $mode);
30 
31  $selection_options = $this->buildOptionsInput();
32  $opt->addSubItem($selection_options);
33 
34  $selection_type = new ilRadioGroupInputGUI(
35  $this->lng->txt('dcl_selection_type'),
36  'prop_' . static::PROP_SELECTION_TYPE
37  );
38  $selection_type->setRequired(true);
39 
40  $options = [
44  ];
45 
46  foreach ($options as $option) {
47  $selection_type->addOption(new ilRadioOption($this->lng->txt('dcl_' . $option), $option));
48  }
49 
50  $opt->addSubItem($selection_type);
51 
52  return $opt;
53  }
This class represents an option in a radio group.
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 25 of file class.ilDclSelectionFieldRepresentation.php.

◆ PROP_SELECTION_TYPE

const ilDclSelectionFieldRepresentation::PROP_SELECTION_TYPE = ''

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


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