ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
GlyphRendererFactory.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2017 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
6 
9 
11 {
12  public const USE_BUTTON_CONTEXT_FOR = [
13  'BulkyButton',
14  'BulkyLink'
15  ];
16 
17  public function getRendererInContext(Component\Component $component, array $contexts)
18  {
19  if (count(array_intersect(self::USE_BUTTON_CONTEXT_FOR, $contexts)) > 0) {
20  return new ButtonContextRenderer(
21  $this->ui_factory,
22  $this->tpl_factory,
23  $this->lng,
24  $this->js_binding,
25  $this->refinery,
26  $this->image_path_resolver
27  );
28  }
29  return new Renderer(
30  $this->ui_factory,
31  $this->tpl_factory,
32  $this->lng,
33  $this->js_binding,
34  $this->refinery,
35  $this->image_path_resolver
36  );
37  }
38 }
getRendererInContext(Component\Component $component, array $contexts)