ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Breadcrumbs.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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