ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Chatroom.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS;
22
24{
25 public function init(
26 array | \ArrayAccess &$define,
27 array | \ArrayAccess &$implement,
28 array | \ArrayAccess &$use,
29 array | \ArrayAccess &$contribute,
30 array | \ArrayAccess &$seek,
31 array | \ArrayAccess &$provide,
32 array | \ArrayAccess &$pull,
33 array | \ArrayAccess &$internal,
34 ): void {
35 $contribute[\ILIAS\Setup\Agent::class] = static fn() => new \ilChatroomSetupAgent($pull[\ILIAS\Refinery\Factory::class]);
36 $contribute[User\Settings\UserSettings::class] = fn() =>
38
39 $files = [
40 '../chat/node_modules/socket.io-client/dist/socket.io.min.js',
41 'js/dist/Chatroom.min.js',
42 ];
43
44 $type = ['js' => Component\Resource\ComponentJS::class, 'css' => Component\Resource\ComponentCSS::class];
45
46 foreach ($files as $file) {
47 $class = $type[substr($file, strrpos($file, '.') + 1)];
48 if (file_exists(__DIR__ . '/resources/' . $file)) {
49 $contribute[Component\Resource\PublicAsset::class] = fn() => new $class($this, $file);
50 }
51 }
52 }
53}
init(array|\ArrayAccess &$define, array|\ArrayAccess &$implement, array|\ArrayAccess &$use, array|\ArrayAccess &$contribute, array|\ArrayAccess &$seek, array|\ArrayAccess &$provide, array|\ArrayAccess &$pull, array|\ArrayAccess &$internal,)
Definition: Chatroom.php:25
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
A component is the most general form of an entity in the UI.
Definition: Component.php:28
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.