ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
FormRendererFactory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
25 
27 {
29  'StateStatePrompt',
30  'RoundTripModal',
31  ];
32 
33  public function getRendererInContext(Component\Component $component, array $contexts): Render\AbstractComponentRenderer
34  {
35  $has_context_without_buttons = array_intersect(self::FORM_CONTEXTS_WITHOUT_BUTTONS, $contexts);
36 
37  if (! empty($has_context_without_buttons)) {
39  $this->ui_factory,
40  $this->tpl_factory,
41  $this->lng,
42  $this->js_binding,
43  $this->image_path_resolver,
44  $this->data_factory,
45  $this->help_text_retriever,
46  $this->upload_limit_resolver
47  );
48  }
49  return new Renderer(
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 }
getRendererInContext(Component\Component $component, array $contexts)