19 declare(strict_types=1);
46 protected array $options,
47 protected string $selected,
50 $check = array_keys($options);
52 $this->checkArgIsElement(
'selected', $selected,
$check,
'one of [' . implode(
', ', array_keys($options)) .
']');
62 $clone->initSignals();
71 $this->select_signal = $this->signal_generator->create();
94 $this->checkStringArg(
"url", $url);
95 $this->checkStringArg(
"parameter_name", $parameter_name);
97 $clone->target_url =
$url;
123 return $this->options;
144 $possible = array_keys($this->options);
145 $this->checkArgIsElement(
'selected_option', $selected_option, $possible,
'one of [' . implode(
', ', $possible) .
']');
146 $clone = clone $this;
147 $clone->selected = $selected_option;
153 return $this->selected;
withOnSort(Signal $signal)
withTriggeredSignal(C\Signal $signal, string $event)
Add a triggered signal, replacing any other signals registered on the same event. ...
__construct(protected array $options, protected string $selected, protected SignalGeneratorInterface $signal_generator)
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
withTargetURL(string $url, string $parameter_name)
withLabelPrefix(string $label_prefix)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withSelected(string $selected_option)
initSignals()
Set the signals for this component.