19 declare(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
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);
This class represents an option in a radio group.
ilDclBaseFieldModel $field
buildFieldCreationInput(ilObjDataCollection $dcl, string $mode='create')
const string SELECTION_TYPE_COMBOBOX
getFilterInputFieldValue(ilTableFilterItem $input)
addFilterInputFieldToTable(ilTable2GUI $table)
setupInputField(ilFormPropertyGUI $input, ilDclBaseFieldModel $field)
Sets basic settings on field-input.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
getInputField(ilPropertyFormGUI $form, ?int $record_id=null)
getPropertyInputFieldId(string $property)
Return post-var for property-fields.
static getAllForField(int $field_id)
const string SELECTION_TYPE_SINGLE
setupFilterInputField(?ilTableFilterItem $input)
Set basic settings for filter-input-gui.
const string SELECTION_TYPE_MULTI