ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\Component\Launcher\Launcher Interface Reference
+ Inheritance diagram for ILIAS\UI\Component\Launcher\Launcher:
+ Collaboration diagram for ILIAS\UI\Component\Launcher\Launcher:

Public Member Functions

 withDescription (string $description)
 
 withInputs (Group $fields, \Closure $evaluation, ?MessageBox\MessageBox $instruction=null)
 If the Launcher is configured with Inputs, an Roundtrip Modal is shown with these Inputs. More...
 
 withStatusIcon (null|Icon|ProgressMeter $status_icon)
 
 withStatusMessageBox (?MessageBox\MessageBox $status_message)
 
 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. More...
 
 withRequest (ServerRequestInterface $request)
 
 withModalSubmitLabel (?string $label)
 
 withModalCancelLabel (?string $label)
 
- Public Member Functions inherited from ILIAS\UI\Component\Component
 getCanonicalName ()
 Get the canonical name of the component. More...
 
 reduceWith (\Closure $fn)
 The scheme starts at the leaves of the structure and applies the function to each leave and moves up the tree recursively. More...
 

Detailed Description

Definition at line 30 of file Launcher.php.

Member Function Documentation

◆ 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().

+ Here is the caller graph for this function:

◆ 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.
Definition: Result.php:29
isOK()
Get to know if the result is ok.
value()
Get the encapsulated value.

Referenced by ILIAS\Test\Presentation\TestScreenGUI\buildModalLauncher().

+ Here is the caller graph for this function:

◆ 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()

ILIAS\UI\Component\Launcher\Launcher::withStatusMessageBox ( ?MessageBox\MessageBox  $status_message)

The documentation for this interface was generated from the following file: