ILIAS  release_8 Revision v8.24
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{
36
40 protected ?Closure $handle_opened = null;
41
45 protected ?Closure $handle_closed = null;
46
51 public function __construct(IdentificationInterface $identification)
52 {
53 $this->handle_opened = function (): void {
54 };
55
56 $this->provider_identification = $identification;
57 }
58
63 {
65 }
66
70 public function getRenderer(UIFactory $factory): NotificationRenderer
71 {
73 }
74
78 public function withOpenedCallable(callable $handle_opened): isItem
79 {
80 $clone = clone $this;
81 $clone->handle_opened = $handle_opened;
82 return $clone;
83 }
84
88 public function getOpenedCallable(): callable
89 {
91 }
92
96 public function withClosedCallable(callable $handle_closed): isItem
97 {
98 $clone = clone $this;
99 $clone->handle_closed = $handle_closed;
100 return $clone;
101 }
102
106 public function getClosedCallable(): ?callable
107 {
109 }
110
114 public function hasClosedCallable(): bool
115 {
116 return is_callable($this->handle_closed);
117 }
118}
__construct(IdentificationInterface $identification)
StandardNotification constructor.
Closure $handle_opened
Callable to be executed, if the notification center has been opened.
Closure $handle_closed
Callable to be executed, if this specific item has been closed.
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:38
$factory
Definition: metadata.php:75
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...