ILIAS  release_8 Revision v8.24
Breadcrumbs.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
24use ILIAS\UI\Implementation\Component\ComponentHelper;
26
27class Breadcrumbs implements B\Breadcrumbs
28{
29 use ComponentHelper;
30
34 protected array $crumbs;
35
39 public function __construct(array $crumbs)
40 {
41 $types = array(Standard::class);
42 $this->checkArgListElements("crumbs", $crumbs, $types);
43 $this->crumbs = $crumbs;
44 }
45
49 public function getItems(): array
50 {
51 return $this->crumbs;
52 }
53
57 public function withAppendedItem(Standard $crumb): B\Breadcrumbs
58 {
59 $clone = clone $this;
60 $clone->crumbs[] = $crumb;
61 return $clone;
62 }
63}
withAppendedItem(Standard $crumb)
Append a crumb-entry to the bar.
Definition: Breadcrumbs.php:57
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Breadcrumbs.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Breadcrumbs.php:21