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
25
31{
35 protected function getSpecificComponentForItem(isItem $item): Component
36 {
40 $link = $this->ui->factory()->link()->bulky(
41 $this->buildIcon($item),
42 $item->getTitle(),
43 $this->getURI($item->getAction())
44 );
45
46 if (null !== $item->getContentLanguage()) {
47 $link = $link->withContentLanguage($item->getContentLanguage());
48 }
49
50 if (null !== $item->getLanguageForTargetedResource()) {
51 return $link->withLanguageOfReferencedContent($item->getLanguageForTargetedResource());
52 }
53
54 return $link;
55 }
56}
A component is the most general form of an entity in the UI.
Definition: Component.php:28