19 declare(strict_types=1);
48 VocabSlotHandler $vocab_slot_handler
61 $slot = $this->element_vocab_helper->slotForElement($element);
62 $unique_path_to_conditional_element = $this->path_factory->toElement($conditional_element,
true);
63 $path_for_conditional_slot = $this->path_factory->toElement($conditional_element);
64 $path_for_condition = $this->path_factory->betweenElements($conditional_element, $element);
70 foreach ($this->element_vocab_helper->vocabulariesForSlot($slot) as
$vocab) {
72 foreach (
$vocab->values() as $value) {
73 $conditional_slot = $this->vocab_slot_handler->identiferFromPathAndCondition(
74 $path_for_conditional_slot,
85 if (
$data === $value && isset($conditional_data)) {
86 $input = $input->withValue($conditional_data);
89 $groups[$value] = $this->ui_factory->group(
90 [$unique_path_to_conditional_element->toString() => $input],
91 $labels_by_value[$value] ??
'' 96 $radios = $this->ui_factory->switchableGroup(
98 $this->getInputLabelFromElement($this->presenter, $element, $context_element)
101 $radios = $radios->withValue(
$data);
103 return $this->addConstraintsFromElement(
104 $this->constraint_dictionary,
112 $presentable_labels = $this->presenter->data()->vocabularyValues(
114 ...$vocabulary->values()
116 $labels_by_value = [];
117 foreach ($presentable_labels as $labelled_value) {
118 $labels_by_value[$labelled_value->value()] = $labelled_value->label();
120 return $labels_by_value;
126 if ($element->
getData()->type() !== Type::NULL) {
129 return $this->getPresetValueFromConstraints($this->constraint_dictionary, $element) ??
$data;
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(Container $dic, ilPlugin $plugin)