ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Prompt.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25use ILIAS\UI\Implementation\Component\ComponentHelper;
28
30
34abstract class Prompt implements I\Prompt
35{
36 use ComponentHelper;
38
41
42 public function __construct(
43 SignalGenerator $signal_generator,
44 protected URI $async_url
45 ) {
46 $this->show_signal = $signal_generator->create();
47 $this->close_signal = $signal_generator->create();
48 }
49
50 public function getAsyncUrl(): URI
51 {
52 return $this->async_url;
53 }
54
55 public function getShowSignal(?URI $uri = null): Signal
56 {
57 $target = $uri ?? $this->async_url;
58 $signal = clone $this->show_signal;
59 $signal->addOption('url', $target->__toString());
60 return $signal;
61 }
62
63 public function getCloseSignal(): Signal
64 {
66 }
67}
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
__construct(SignalGenerator $signal_generator, protected URI $async_url)
Definition: Prompt.php:42
create(string $class='')
Create a signal, each created signal MUST have a unique ID.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.