Definition at line 30 of file Launcher.php.
◆ withButtonLabel()
ILIAS\UI\Component\Launcher\Launcher::withButtonLabel |
( |
string |
$label, |
|
|
bool |
$launchable = true |
|
) |
| |
Labels the button that launches the process; if the process is not launchable for the user, set the second parameter to false.
Also indicate, why the process is not launchable or provide information what is blocking via withStatusMessageBox.
Referenced by ILIAS\Test\Presentation\TestScreenGUI\getLauncher().
◆ withDescription()
ILIAS\UI\Component\Launcher\Launcher::withDescription |
( |
string |
$description | ) |
|
◆ withInputs()
ILIAS\UI\Component\Launcher\Launcher::withInputs |
( |
Group |
$fields, |
|
|
\Closure |
$evaluation, |
|
|
?MessageBox\MessageBox |
$instruction = null |
|
) |
| |
If the Launcher is configured with Inputs, an Roundtrip Modal is shown with these Inputs.
The Form's Result is passed intto $evaluation as well as the Launcher instance itself. Finally, you can add a MessageBox to the Modal with $instruction.
a typical $evaluation might look like this:
function (
Result $result,
Launcher &$launcher) use ($ctrl, $ui_factory) {
if ($result->
isOK() && $result->
value()[0]) {
$ctrl->redirectToURL(
(string)$launcher->getTarget()->getURL()->withParameter('launcher_redirect', 'terms accepted')
);
}
$launcher = $launcher->withStatusMessageBox($ui_factory->messageBox()->failure('You must accept the conditions.'));
A result encapsulates a value or an error and simplifies the handling of those.
isOK()
Get to know if the result is ok.
value()
Get the encapsulated value.
Referenced by ILIAS\Test\Presentation\TestScreenGUI\buildModalLauncher().
◆ withModalCancelLabel()
ILIAS\UI\Component\Launcher\Launcher::withModalCancelLabel |
( |
?string |
$label | ) |
|
◆ withModalSubmitLabel()
ILIAS\UI\Component\Launcher\Launcher::withModalSubmitLabel |
( |
?string |
$label | ) |
|
◆ withRequest()
ILIAS\UI\Component\Launcher\Launcher::withRequest |
( |
ServerRequestInterface |
$request | ) |
|
◆ withStatusIcon()
ILIAS\UI\Component\Launcher\Launcher::withStatusIcon |
( |
null|Icon|ProgressMeter |
$status_icon | ) |
|
◆ withStatusMessageBox()
The documentation for this interface was generated from the following file: