ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
GlyphRendererFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
28{
34 protected const array USE_BUTTON_CONTEXT_RENDERER_FOR = [
35 'BranchNodeFieldInput',
36 'LeafNodeFieldInput',
37 'AsyncNodeFieldInput',
38 'StandardButton',
39 'PrimaryButton',
40 'BulkyButton',
41 'ShyButton',
42 'BulkyLink',
43 'ShyLink',
44 ];
45
46 public function getRendererInContext(Component\Component $component, array $contexts): ComponentRenderer
47 {
48 if (count(array_intersect(self::USE_BUTTON_CONTEXT_RENDERER_FOR, $contexts)) > 0) {
49 return new ButtonContextRenderer(
50 $this->ui_factory,
51 $this->tpl_factory,
52 $this->lng,
53 $this->js_binding,
54 $this->image_path_resolver,
55 $this->data_factory,
56 $this->help_text_retriever,
57 $this->upload_limit_resolver
58 );
59 }
60 return new Renderer(
61 $this->ui_factory,
62 $this->tpl_factory,
63 $this->lng,
64 $this->js_binding,
65 $this->image_path_resolver,
66 $this->data_factory,
67 $this->help_text_retriever,
68 $this->upload_limit_resolver
69 );
70 }
71}
getRendererInContext(Component\Component $component, array $contexts)
const array USE_BUTTON_CONTEXT_RENDERER_FOR
components which render glyphs inside an HTML <button> element, where only palpable content is allowe...
An entity that renders components to a string output.