ILIAS  release_7 Revision v7.30-3-g800a261c036
AbstractBaseNotification.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26use ILIAS\UI\Factory as UIFactory;
27use Closure;
28
34{
39
44 protected $handle_opened;
45
50 protected $handle_closed;
51
56 public function __construct(IdentificationInterface $identification)
57 {
58 $this->handle_opened = function () : void {
59 };
60
61 $this->provider_identification = $identification;
62 }
63
68 {
70 }
71
75 public function getRenderer(UIFactory $factory) : NotificationRenderer
76 {
78 }
79
83 public function withOpenedCallable(callable $handle_opened) : isItem
84 {
85 $clone = clone $this;
86 $clone->handle_opened = $handle_opened;
87 return $clone;
88 }
89
93 public function getOpenedCallable() : callable
94 {
96 }
97
101 public function withClosedCallable(callable $handle_closed) : isItem
102 {
103 $clone = clone $this;
104 $clone->handle_closed = $handle_closed;
105 return $clone;
106 }
107
111 public function getClosedCallable() : ?callable
112 {
114 }
115
119 public function hasClosedCallable() : bool
120 {
121 return is_callable($this->handle_closed);
122 }
123}
An exception for terminatinating execution or to throw for unit testing.
__construct(IdentificationInterface $identification)
StandardNotification constructor.
Interface NotificationRenderer Every Notification should have a renderer, if you won't provide on in ...
This is how the factory for UI elements looks.
Definition: Factory.php:18
$factory
Definition: metadata.php:58