19 declare(strict_types=1);
34 class Inline implements C\Launcher\Inline
45 protected ?Modal\Roundtrip
$modal = null;
49 protected ?ServerRequestInterface
$request = null;
57 $this->modal_factory = $modal_factory;
58 $this->target = $target;
70 $clone->description = $description;
76 return $this->description;
82 $clone->status_icon = $status_icon;
88 return $this->status_icon;
94 $clone->status_message = $status_message;
99 return $this->status_message;
104 $clone = clone $this;
105 $clone->label = $label;
106 $clone->launchable = $launchable;
117 return $this->launchable;
122 $modal = $this->modal_factory->roundtrip(
126 $this->
getTarget()->getURL()->__toString()
128 $clone = clone $this;
129 $clone->modal = $modal;
130 $clone->evaluation = $evaluation;
134 public function withRequest(ServerRequestInterface $request): self
136 $clone = clone $this;
137 $clone->request = $request;
143 if ($this->request && $this->request->getMethod() ==
"POST") {
144 $modal = $this->
modal->withRequest($this->request);
145 $result = $modal->getForm()->getInputGroup()->getContent();
158 return $this->evaluation;
163 $clone = clone $this;
164 $clone->modal_submit_label = $label;
170 return $this->modal_submit_label;
175 $clone = clone $this;
176 $clone->modal_cancel_label = $label;
182 return $this->modal_cancel_label;
This describes commonalities between the different modals.
string $modal_cancel_label
A Link is the often used combination of a label and an URL.
withStatusMessageBox(?MessageBox\MessageBox $status_message)
withButtonLabel(string $label, bool $launchable=true)
withModalSubmitLabel(?string $label)
This describes how an icon could be modified during construction of UI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A result encapsulates a value or an error and simplifies the handling of those.
null Icon ProgressMeter $status_icon
Modal Factory $modal_factory
withRequest(ServerRequestInterface $request)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Modal\Factory $modal_factory, Link $target)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $modal_submit_label
modal(string $title="", string $cancel_label="")
withInputs(Group $fields, \Closure $evaluation, MessageBox\MessageBox $instruction=null)
MessageBox MessageBox $status_message
ServerRequestInterface $request
withStatusIcon(null|Icon|ProgressMeter $status_icon)
MessageBox MessageBox $instruction
withModalCancelLabel(?string $label)
withDescription(string $description)