19declare(strict_types=1);
44 DataFactory $data_factory,
46 protected string $label,
47 protected ?
string $byline =
null,
62 if ($clone->content->isError()) {
63 $error = $clone->content->error();
64 if (
$error instanceof \Exception) {
67 return $clone->withError(
"" .
$error);
87 $clone->label = $label;
104 $clone = clone $this;
105 $clone->byline = $byline;
114 return $this->is_required;
122 $clone = clone $this;
123 $clone->is_required = $is_required;
124 $clone->requirement_constraint = ($is_required) ? $requirement_constraint :
null;
133 return $this->is_disabled;
141 $clone = clone $this;
142 $clone->is_disabled = $is_disabled;
174 return $this->data_factory->ok(
$res);
192 yield
from parent::getOperations();
A result encapsulates a value or an error and simplifies the handling of those.
A constraint encodes some resrtictions on values.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
appendTriggeredSignal(C\Signal $signal, string $event)
Append a triggered signal to other signals of the same event.
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.