ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Notification.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 2019 Timnon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
3
5
6use \ILIAS\UI\Component\MainControls\Slate as ISlate;
7use ILIAS\UI\Component\Item\Notification as NotificationItem;
10
15class Notification extends Slate implements ISlate\Notification
16{
20 protected $contents = [];
21
22 public function __construct(
23 SignalGeneratorInterface $signal_generator,
24 string $name,
25 $notification_items,
27 ) {
28 $this->contents = $notification_items;
29 parent::__construct($signal_generator, $name, $symbol);
30 }
31
35 public function withAdditionalEntry(NotificationItem $entry) : ISlate\Notification
36 {
37 $clone = clone $this;
38 $clone->contents[] = $entry;
39 return $clone;
40 }
41
45 public function getContents() : array
46 {
47 return $this->contents;
48 }
49
50 public function withMappedSubNodes(callable $f)
51 {
52 return $this;
53 }
54}
An exception for terminatinating execution or to throw for unit testing.
__construct(SignalGeneratorInterface $signal_generator, string $name, $notification_items, Symbol $symbol)
This describes a symbol.
Definition: Symbol.php:12
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc