ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
COPage.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS;
22 
23 class COPage implements Component\Component
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() =>
36  new \ILIAS\COPage\Setup\Agent(
37  $pull[\ILIAS\Refinery\Factory::class]
38  );
39 
40  // This is included via anonymous classes as a testament to the fact, that
41  // the js and css of the COPage should be restructured according to the target
42  // structure in the component directory and the public directory.
43  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
44  public function getSource(): string
45  {
46  return "components/ILIAS/COPage/PC/InteractiveImage/js";
47  }
48  public function getTarget(): string
49  {
50  return "components/ILIAS/COPage/PC/InteractiveImage/js";
51  }
52  };
53  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
54  public function getSource(): string
55  {
56  return "components/ILIAS/COPage/PC/Tabs/js";
57  }
58  public function getTarget(): string
59  {
60  return "components/ILIAS/COPage/PC/Tabs/js";
61  }
62  };
63  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
64  public function getSource(): string
65  {
66  return "components/ILIAS/COPage/Editor/js";
67  }
68  public function getTarget(): string
69  {
70  return "components/ILIAS/COPage/Editor/js";
71  }
72  };
73  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
74  public function getSource(): string
75  {
76  return "components/ILIAS/COPage/js";
77  }
78  public function getTarget(): string
79  {
80  return "components/ILIAS/COPage/js";
81  }
82  };
83  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
84  public function getSource(): string
85  {
86  return "components/ILIAS/COPage/css";
87  }
88  public function getTarget(): string
89  {
90  return "components/ILIAS/COPage/css";
91  }
92  };
93  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
94  public function getSource(): string
95  {
96  return "vendor/ilias/Style/basic_style";
97  }
98  public function getTarget(): string
99  {
100  return "components/ILIAS/COPage/basic_style";
101  }
102  };
103  $contribute[Component\Resource\PublicAsset::class] = static fn() => new class () implements Component\Resource\PublicAsset {
104  public function getSource(): string
105  {
106  return "components/ILIAS/COPage/IntLink/resources/ilIntLink.js";
107  }
108  public function getTarget(): string
109  {
110  return "assets/js/ilIntLink.js";
111  }
112  };
113 
114  }
115 }
Interface Observer Contains several chained tasks and infos about them.
An public asset is a file or folder that should be served via the web.
Definition: PublicAsset.php:26
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: COPage.php:25