ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Client.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
21 
23 
28 class Client
29 {
31 
36  public function __construct(ClientSettings $settings)
37  {
38  $this->settings = $settings;
39  }
40 
41  public function init(MetaContent $content): void
42  {
43  $content->addJs("./src/GlobalScreen/Client/dist/GS.js", true, 1);
44  $init_script = "il.GS.Client.init('" . json_encode($this->settings) . "');";
45  $content->addOnloadCode($init_script, 1);
46  }
47 }
addJs(string $path, bool $add_version_number=false, int $batch=2)
Definition: MetaContent.php:80
__construct(ClientSettings $settings)
Client constructor.
Definition: Client.php:36
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: gs_content.php:1
init(MetaContent $content)
Definition: Client.php:41