19 declare(strict_types=1);
39 $factory = $DIC->ui()->factory();
41 $df = new \ILIAS\Data\Factory();
43 $here_uri = $df->uri($DIC->http()->request()->getUri()->__toString());
45 $example_namespace = [
'prompt',
'close'];
46 list($url_builder, $action_token) = $url_builder->acquireParameters(
52 $query = $DIC->http()->wrapper()->query();
53 if ($query->has($action_token->getName())) {
54 $action = $query->retrieve($action_token->getName(),
$refinery->kindlyTo()->string());
55 if ($action ===
'closecommand') {
57 $response = $factory->prompt()->state()->close();
60 $close = $factory->link()->standard(
62 $url_builder->withParameter($action_token,
'closecommand')->buildURI()->__toString()
65 $message = $factory->messageBox()->info(
'some message box')
66 ->withLinks([$close]);
74 $prompt = $factory->prompt()->standard($url_builder->buildURI());
76 $factory->button()->standard(
'Show Prompt', $prompt->getShowSignal()),
base()
description: > The example demonstrates how to use commands in the Response.
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...