ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
AbstractFooterItemRenderer.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25use ILIAS\GlobalScreen\Collector\Renderer\DecoratorApplierTrait;
26use ILIAS\GlobalScreen\Collector\Renderer\isSupportedTrait;
30
35{
36 use DecoratorApplierTrait;
37 use isSupportedTrait;
38
39 public function __construct(protected UIServices $ui)
40 {
41 }
42
43 protected function getURI(string $uri_string): URI
44 {
45 if (str_starts_with($uri_string, 'http')) {
46 return new URI($uri_string);
47 }
48
49 return new URI(rtrim(ILIAS_HTTP_PATH, "/") . "/" . ltrim($uri_string, "./"));
50 }
51
52 public function getComponentForItem(isItem $item): Component|array
53 {
54 $component = $this->getSpecificComponentForItem($item);
55 if ($component instanceof Component) {
56 $component = $this->applyComponentDecorator($component, $item);
57 if ($component instanceof HasHelpTopics) {
58 return $component->withHelpTopics(...$item->getTopics());
59 }
60 }
61
62 // decoratory are applied to array elemts in specific rendereres
63
64 return $component;
65 }
66
67 abstract protected function getSpecificComponentForItem(isItem $item): Component|array;
68}
Provides fluid interface to RBAC services.
Definition: UIServices.php:25
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
A component is the most general form of an entity in the UI.
Definition: Component.php:28