ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Renderer.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
25 
29 class Renderer
30 {
32 
33  public function __construct(
34  private EmbeddedApplication $embedded_application
35  ) {
36  global $DIC;
37  $this->ui_factory = $DIC->ui()->factory();
38  }
39 
40  public function getComponent(): Component
41  {
42  $tpl = new \ilTemplate('tpl.wopi_container.html', true, true, 'components/ILIAS/WOPI');
43  $tpl->setVariable('EDITOR_URL', (string) $this->embedded_application->getActionLauncherURL());
44  $tpl->setVariable('INLINE', (string) (int) $this->embedded_application->isInline());
45  $tpl->setVariable('TOKEN', (string) $this->embedded_application->getToken());
46  $tpl->setVariable('TTL', (string) (time() + $this->embedded_application->getTTL()) * 1000); // in milliseconds
47 
48  return $this->ui_factory->legacy()->content($tpl->get());
49  }
50 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This is how the factory for UI elements looks.
Definition: Factory.php:37
global $DIC
Definition: shib_login.php:22
__construct(private EmbeddedApplication $embedded_application)
Definition: Renderer.php:33