ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
Renderer.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 class Renderer
27 {
28  private \ILIAS\UI\Factory $ui_factory;
29 
30  public function __construct(
31  private EmbeddedApplication $embedded_application
32  ) {
33  global $DIC;
34  $this->ui_factory = $DIC->ui()->factory();
35  }
36 
37  public function getComponent(): \ILIAS\UI\Component\Component
38  {
39  $tpl = new \ilTemplate('tpl.wopi_container.html', true, true, 'components/ILIAS/WOPI');
40  $tpl->setVariable('EDITOR_URL', (string) $this->embedded_application->getActionLauncherURL());
41  $tpl->setVariable('INLINE', (string) (int) $this->embedded_application->isInline());
42  $tpl->setVariable('TOKEN', (string) $this->embedded_application->getToken());
43  $tpl->setVariable('TTL', (string) (time() + $this->embedded_application->getTTL()) * 1000); // in milliseconds
44 
45  return $this->ui_factory->legacy($tpl->get());
46  }
47 }
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:25
__construct(private EmbeddedApplication $embedded_application)
Definition: Renderer.php:30