ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
DecoratorApplierTrait.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
28 
33 {
34  private function applyTopics(HasHelpTopics $component, isDecorateable $item): Component
35  {
36  return $component->withHelpTopics(...$item->getTopics());
37  }
38 
39  public function applyComponentDecorator(Component $component, isGlobalScreenItem $item): Component
40  {
41  $c = $item->getComponentDecorator();
42  if ($c !== null) {
43  return $c($component);
44  }
45 
46  return $component;
47  }
48 
49  public function applySymbolDecorator(Symbol $symbol, isGlobalScreenItem $item): Symbol
50  {
51  $c = $item->getSymbolDecorator();
52  if ($c !== null) {
53  return $c($symbol);
54  }
55 
56  return $symbol;
57  }
58 }
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...
$c
Definition: deliver.php:25
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withHelpTopics(Topic ... $topics)
Let this component have the given topics.