25 $opt = parent::buildFieldCreationInput($dcl, $mode);
28 $opt->addSubItem($selection_options);
30 $selection_type =
new ilRadioGroupInputGUI($this->lng->txt(
'dcl_selection_type'),
'prop_' . static::PROP_SELECTION_TYPE);
37 $selection_type->addOption($option_1);
43 $selection_type->addOption($option_2);
49 $selection_type->addOption($option_3);
67 switch ($this->
getField()->getProperty(static::PROP_SELECTION_TYPE)) {
73 $input->setHeight(100);
74 $input->setHeightUnit(
'%; max-height: 150px');
75 $input->setWidth(100);
76 $input->setWidthUnit(
'%');
79 foreach ($options as $opt) {
80 $array[$opt->getOptId()] = $opt->getValue();
82 $input->setOptions($array);
87 foreach ($options as $opt) {
88 $array[$opt->getOptId()] = $opt->getValue();
90 $input->setOptions(array(
"" => $this->lng->txt(
'dcl_please_select')) + $array);
95 foreach ($options as $opt) {
96 $input->addOption(
new ilRadioOption($opt->getValue(), $opt->getOptId()));
98 $input->setValue(array_keys($options)[0]);
117 $array = array(
'' => $this->lng->txt(
'dcl_all_entries'));
118 foreach ($options as $opt) {
119 $array[$opt->getOptId()] = $opt->getValue();
122 $array[
'none'] = $this->lng->txt(
'dcl_no_entry');
124 $input->setOptions($array);
This class represents an option in a radio group.
const SELECTION_TYPE_SINGLE
const SELECTION_TYPE_MULTI
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
buildFieldCreationInput(ilObjDataCollection $dcl, $mode='create')
addFilterInputFieldToTable(ilTable2GUI $table)
Class ilDclSelectionFieldRepresentation.
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
static getAllForField($field_id)
addSubItem($a_item)
Add Subitem.
const SELECTION_TYPE_COMBOBOX
setupFilterInputField(ilFormPropertyGUI $input)
Set basic settings for filter-input-gui.
getField()
Return BaseFieldModel.
getInputField(ilPropertyFormGUI $form, $record_id=0)
Returns field-input.
const PROP_SELECTION_OPTIONS
const PROP_SELECTION_TYPE
Class ilDclBaseFieldRepresentation.
getFilterInputFieldValue( $input)
Class ilObjDataCollection.