ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
6 use \ILIAS\UI\Component\MainControls\Slate as ISlate;
11 
16 class Notification extends Slate implements ISlate\Notification
17 {
21  protected $contents = [];
22 
23  public function __construct(
25  string $name,
26  $notification_items,
28  ) {
29  $this->contents = $notification_items;
30  parent::__construct($signal_generator, $name, $symbol);
31  }
32 
37  {
38  $clone = clone $this;
39  $clone->contents[] = $entry;
40  return $clone;
41  }
42 
46  public function getContents() : array
47  {
48  return $this->contents;
49  }
50 
51  public function withMappedSubNodes(callable $f)
52  {
53  return $this;
54  }
55 }
Notifications Slates are Slates restricted to only containing Notification Items. ...
This describes a symbol.
Definition: Symbol.php:11
__construct(SignalGeneratorInterface $signal_generator, string $name, $notification_items, Symbol $symbol)
__construct(Container $dic, ilPlugin $plugin)
withAdditionalEntry(NotificationItem $entry)
Get a Notification Slate like this, but with one additional Notification Item entry.