ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
7 use ILIAS\UI\Component as C;
9 
13 class Group implements C\Item\Group
14 {
15  use ComponentHelper;
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 }
__construct($title, array $items)
Group constructor.
Definition: Group.php:37
Class Factory.
Class BaseForm.
trait ComponentHelper
Provides common functionality for component implementations.
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
Common interface to all items.
Definition: Group.php:13
Create styles array
The data for the language used.
withActions(\ILIAS\UI\Component\Dropdown\Standard $actions)
Definition: Group.php:63