19declare(strict_types=1);
30 $opt = parent::buildFieldCreationInput($dcl, $mode);
33 $opt->addSubItem($selection_options);
36 $this->
lng->txt(
'dcl_selection_type'),
37 'prop_' . $this->field::PROP_SELECTION_TYPE
39 $selection_type->setRequired(
true);
47 foreach ($options as $option) {
48 $selection_type->addOption(
new ilRadioOption($this->
lng->txt(
'dcl_' . $option), $option));
51 $opt->addSubItem($selection_type);
54 $this->
lng->txt(
'dcl_unique'),
57 $prop_unique->setInfo($this->
lng->txt(
'dcl_unique_desc'));
58 $opt->addSubItem($prop_unique);
67 $options[$opt->getOptId()] = $this->
getField()->personalizeOptionValue($opt->getValue(), $this->user);
69 switch ($this->
getField()->getProperty($this->field::PROP_SELECTION_TYPE)) {
75 $input->setWidth(100);
76 $input->setWidthUnit(
'%');
77 $input->setHeight(32 * min(5, max(1, count($options))));
79 $input->setOptions($options);
83 $input->setOptions([
"" => $this->
lng->txt(
'dcl_please_select')] + $options);
88 foreach ($options as $key => $opt) {
91 $input->setValue((
string) array_key_first($options));
109 $array = [
'' => $this->
lng->txt(
'dcl_all_entries')];
110 foreach ($options as $opt) {
111 $array[$opt->getOptId()] = $opt->getValue();
114 $array[
'none'] = $this->
lng->txt(
'dcl_no_entry');
116 $input->setOptions($array);
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
setupFilterInputField(?ilTableFilterItem $input)
Set basic settings for filter-input-gui.
getFilterInputFieldValue(ilTableFilterItem $input)
const string SELECTION_TYPE_MULTI
const string SELECTION_TYPE_COMBOBOX
const string SELECTION_TYPE_SINGLE
getInputField(ilPropertyFormGUI $form, ?int $record_id=null)
Returns field-input.
ilDclBaseFieldModel $field
addFilterInputFieldToTable(ilTable2GUI $table)
Add filter input to TableGUI.
buildFieldCreationInput(ilObjDataCollection $dcl, string $mode='create')
Build the creation-input-field.
getField()
Return BaseFieldModel.
static getAllForField(int $field_id)
This class represents an option in a radio group.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.