19declare(strict_types=1);
54 return $this->element_helper->slotForElement($element);
62 return $this->element_helper->slotsForElementWithoutCondition($element);
70 return $this->element_helper->potentialSlotForElementByCondition(
72 $element_in_condition,
83 if (!isset($this->cached_vocabularies_by_slot[$slot->value])) {
84 $this->cached_vocabularies_by_slot[$slot->value] = iterator_to_array(
85 $this->reader->activeVocabulariesForSlots($slot),
89 yield
from $this->cached_vocabularies_by_slot[$slot->value];
94 return $this->vocabulariesForSlot($slot)->current() !==
null;
99 foreach ($this->vocabulariesForSlot($slot) as
$vocab) {
100 if (!
$vocab->allowsCustomInputs()) {
108 SlotIdentifier $slot,
111 foreach ($this->vocabulariesForSlot($slot) as
$vocab) {
112 if (in_array($value, iterator_to_array(
$vocab->values()),
true)) {
123 SlotIdentifier $slot,
124 ?
string $add_if_not_included =
null
127 foreach ($this->vocabulariesForSlot($slot) as
$vocab) {
128 $values_from_vocab = iterator_to_array(
$vocab->values());
129 $values = array_merge($values, $values_from_vocab);
132 if (isset($add_if_not_included) && !in_array($add_if_not_included, $values)) {
133 array_unshift($values, $add_if_not_included);
140 $sources_by_value = [];
141 foreach ($this->vocabulariesForSlot($slot) as
$vocab) {
142 $values_from_vocab = iterator_to_array(
$vocab->values());
143 $sources_by_value = array_merge(
145 array_fill_keys($values_from_vocab,
$vocab->source())
149 return function (
string $value) use ($sources_by_value) {
150 return $sources_by_value[$value] ??
null;
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))