ILIAS  release_7 Revision v7.30-3-g800a261c036
Sub.php
Go to the documentation of this file.
1<?php
2declare(strict_types=1);
3
4/* Copyright (c) 2019 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
5
7
12
16class Sub extends LabeledMenu implements IMenu\Sub
17{
21 protected $active = false;
22
27 public function __construct($label, array $items)
28 {
30 $this->checkItemParameter($items);
31 $this->label = $label;
32 $this->items = $items;
33 }
34
38 public function withInitiallyActive() : IMenu\Sub
39 {
40 $clone = clone $this;
41 $clone->active = true;
42 return $clone;
43 }
44
48 public function isInitiallyActive() : bool
49 {
50 return $this->active;
51 }
52}
An exception for terminatinating execution or to throw for unit testing.
Level of Drilldown Control.
Definition: Sub.php:17
__construct($label, array $items)
Definition: Sub.php:27
withInitiallyActive()
Configure this Submenu to be active when the menu is loaded.
Definition: Sub.php:38
isInitiallyActive()
Is this initially active?
Definition: Sub.php:48
This describes a Submenu, i.e.
Definition: Sub.php:15
This describes how a glyph could be modified during construction of UI.
Definition: Glyph.php:14
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:10
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.