19declare(strict_types=1);
23use ILIAS\UI\Implementation\Component\ComponentHelper;
32use Psr\Http\Message\ServerRequestInterface;
46 protected ?I\Modal\Roundtrip
$modal =
null;
50 protected ?ServerRequestInterface
$request =
null;
58 $this->modal_factory = $modal_factory;
59 $this->target = $target;
71 $clone->description = $description;
77 return $this->description;
83 $clone->status_icon = $status_icon;
89 return $this->status_icon;
95 $clone->status_message = $status_message;
100 return $this->status_message;
105 $clone = clone $this;
106 $clone->label = $label;
107 $clone->launchable = $launchable;
118 return $this->launchable;
123 $modal = $this->modal_factory->roundtrip(
127 $this->getTarget()->getURL()->__toString()
129 $clone = clone $this;
130 $clone->modal = $modal;
131 $clone->evaluation = $evaluation;
135 public function withRequest(ServerRequestInterface $request): self
137 $clone = clone $this;
138 $clone->request = $request;
144 if ($this->request && $this->request->getMethod() ==
"POST") {
145 $modal = $this->
modal->withRequest($this->request);
146 $result = $modal->getForm()->getInputGroup()->getContent();
159 return $this->evaluation;
164 $clone = clone $this;
165 $clone->modal_submit_label = $label;
171 return $this->modal_submit_label;
176 $clone = clone $this;
177 $clone->modal_cancel_label = $label;
183 return $this->modal_cancel_label;
Builds a Color from either hex- or rgb values.
A Link is the often used combination of a label and an URL.
withRequest(ServerRequestInterface $request)
__construct(I\Modal\Factory $modal_factory, Link $target)
MessageBox MessageBox $status_message
I Modal Factory $modal_factory
withButtonLabel(string $label, bool $launchable=true)
withStatusMessageBox(?MessageBox\MessageBox $status_message)
withModalCancelLabel(?string $label)
string $modal_submit_label
MessageBox MessageBox $instruction
ServerRequestInterface $request
withModalSubmitLabel(?string $label)
withInputs(Group $fields, \Closure $evaluation, ?MessageBox\MessageBox $instruction=null)
string $modal_cancel_label
withStatusIcon(null|Icon|ProgressMeter $status_icon)
null Icon ProgressMeter $status_icon
withDescription(string $description)
A result encapsulates a value or an error and simplifies the handling of those.
This describes commonalities between the different modals.
This describes how an icon could be modified during construction of UI.
modal(string $title="", string $cancel_label="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...