ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLSLocatorGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
23
28{
31 protected array $items;
32
34 {
35 $this->url_builder = $url_builder;
36 $this->ui_factory = $ui_factory;
37 }
38
39 public function withItems(array $items): ilLSLocatorGUI
40 {
41 $clone = clone $this;
42 $clone->items = $items;
43 return $clone;
44 }
45
46 public function getComponent(): Component
47 {
48 $crumbs = array_map(
49 function ($item) {
50 return $this->ui_factory->link()->standard(
51 $item['label'],
52 $this->url_builder->getHref($item['command'], $item['parameter'])
53 );
54 },
56 );
57 return $this->ui_factory->breadcrumbs($crumbs);
58 }
59}
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
GUI for Locator element.
__construct(LSUrlBuilder $url_builder, Factory $ui_factory)
LSUrlBuilder $url_builder
withItems(array $items)
A component is the most general form of an entity in the UI.
Definition: Component.php:28
This is how the factory for UI elements looks.
Definition: Factory.php:38