ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LinkItemRenderer.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
31{
32 protected function getSpecificComponentForItem(isItem $item): Component|array
33 {
34 if ($item->getAction() instanceof URI || is_string($item->getAction())) {
35 return $this->ui
36 ->factory()
37 ->link()
38 ->standard(
39 $item->getTitle(),
40 (string) $item->getAction()
41 )
42 ->withOpenInNewViewport($item->mustOpenInNewViewport());
43 }
44
45 return $this->ui
46 ->factory()
47 ->button()
48 ->standard(
49 $item->getTitle(),
50 $item->getAction()
51 );
52 }
53
54}
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