ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
DecoratorApplierTrait.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
31 
36 {
37  private function applyTopics(HasHelpTopics $component, isDecorateable $item): Component
38  {
39  return $component->withHelpTopics(...$item->getTopics());
40  }
41 
42  public function applyComponentDecorator(Component $component, isGlobalScreenItem $item): Component
43  {
44  $c = $item->getComponentDecorator();
45  if ($c !== null) {
46  return $c($component);
47  }
48 
49  return $component;
50  }
51 
52  public function applySymbolDecorator(Symbol $symbol, isGlobalScreenItem $item): Symbol
53  {
54  $c = $item->getSymbolDecorator();
55  if ($c !== null) {
56  return $c($symbol);
57  }
58 
59  return $symbol;
60  }
61 }
This describes a symbol.
Definition: Symbol.php:29
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$c
Definition: deliver.php:9
withHelpTopics(Topic ... $topics)
Let this component have the given topics.