ILIAS  release_7 Revision v7.30-3-g800a261c036
Menu.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
16abstract class Menu implements IMenu\Menu
17{
23 protected $items = [];
24
28 public function getItems() : array
29 {
30 return $this->items;
31 }
32
36 protected function checkItemParameter(array $items)
37 {
38 $classes = [
39 Sub::class,
40 Component\Clickable::class,
41 Component\Link\Link::class,
42 Component\Divider\Horizontal::class
43 ];
44 $this->checkArgListElements("items", $items, $classes);
45 }
46}
An exception for terminatinating execution or to throw for unit testing.
This describes a Menu Control.
Definition: Menu.php:15
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
checkArgListElements($which, array &$values, $classes)
Check every element of the list if it is an instance of one of the given classes.
trait ComponentHelper
Provides common functionality for component implementations.