ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ComponentDecoratorApplierTrait.php
Go to the documentation of this file.
1<?php
2
4
7
13trait ComponentDecoratorApplierTrait
14{
15 public function applyDecorator(Component $component, isGlobalScreenItem $item) : Component
16 {
17 $c = $item->getComponentDecorator();
18 if ($c !== null) {
19 return $c($component);
20 }
21
22 return $component;
23 }
24}
An exception for terminatinating execution or to throw for unit testing.
A component is the most general form of an entity in the UI.
Definition: Component.php:14