ILIAS  release_7 Revision v7.30-3-g800a261c036
Group.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2017 Alex Killing <killing@leifos.de> Extended GPL, see docs/LICENSE */
4
6
9
13class Group implements C\Item\Group
14{
16
20 protected $title;
21
25 protected $items;
26
30 protected $actions;
31
37 public function __construct($title, array $items)
38 {
39 $this->checkStringArg("title", $title);
40 $this->title = $title;
41 $this->items = $items;
42 }
43
47 public function getTitle()
48 {
49 return $this->title;
50 }
51
55 public function getItems()
56 {
57 return $this->items;
58 }
59
63 public function withActions(\ILIAS\UI\Component\Dropdown\Standard $actions)
64 {
65 $clone = clone $this;
66 $clone->actions = $actions;
67 return $clone;
68 }
69
73 public function getActions()
74 {
75 return $this->actions;
76 }
77}
An exception for terminatinating execution or to throw for unit testing.
Common interface to all items.
Definition: Group.php:14
__construct($title, array $items)
Group constructor.
Definition: Group.php:37
withActions(\ILIAS\UI\Component\Dropdown\Standard $actions)
Definition: Group.php:63
A component is the most general form of an entity in the UI.
Definition: Component.php:14
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
trait ComponentHelper
Provides common functionality for component implementations.
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.