ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilLSLocatorGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
7
15{
19 protected $url_builder;
20
24 protected $items;
25
26 public function __construct(
28 Factory $ui_factory
29 ) {
30 $this->url_builder = $url_builder;
31 $this->ui_factory = $ui_factory;
32 }
33
34 public function withItems(array $items)
35 {
36 $clone = clone $this;
37 $clone->items = $items;
38 return $clone;
39 }
40
41 public function getComponent() : Component
42 {
43 $crumbs = array_map(
44 function ($item) {
45 return $this->ui_factory->link()->standard(
46 $item['label'],
47 $this->url_builder->getHref($item['command'], $item['parameter'])
48 );
49 },
51 );
52 return $this->ui_factory->breadcrumbs($crumbs);
53 }
54}
An exception for terminatinating execution or to throw for unit testing.
Class LSUrlBuilder.
GUI for Locator element.
__construct(LSUrlBuilder $url_builder, Factory $ui_factory)
withItems(array $items)
A component is the most general form of an entity in the UI.
Definition: Component.php:14
This is how the factory for UI elements looks.
Definition: Factory.php:16