19declare(strict_types=1);
24use ILIAS\UI\Implementation\Component\ComponentHelper;
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);
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;
initSignals()
Set the signals for this component.
withOnSort(Signal $signal)
withTargetURL(string $url, string $parameter_name)
__construct(protected array $options, protected string $selected, protected SignalGeneratorInterface $signal_generator)
withSelected(string $selected_option)
withLabelPrefix(string $label_prefix)
withTriggeredSignal(C\Signal $signal, string $event)
Add a triggered signal, replacing any other signals registered on the same event.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.