Skip to content

Commit c1d0a1c

Browse files
committed
[FEATURE] implement UI initialisation using bootstrap mechanism.
1 parent 2ba6d35 commit c1d0a1c

47 files changed

Lines changed: 1501 additions & 771 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

components/ILIAS/FileServices/FileServices.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,28 @@ public function init(
3232
array | \ArrayAccess &$pull,
3333
array | \ArrayAccess &$internal,
3434
): void {
35+
// @todo: please implement this inside a proper service.
36+
$implement[UI\Component\Input\Field\PhpUploadLimit::class] = static fn() =>
37+
new class () implements UI\Component\Input\Field\PhpUploadLimit {
38+
public function getPhpUploadLimitInBytes(): int
39+
{
40+
return (int) \ilFileUtils::getPhpUploadSizeLimitInBytes();
41+
}
42+
};
43+
// @todo: please implement this inside a proper service.
44+
$implement[UI\Component\Input\Field\GlobalUploadLimit::class] = static fn() =>
45+
new class () implements UI\Component\Input\Field\GlobalUploadLimit {
46+
public function getGlobalUploadLimitInBytes(): ?int
47+
{
48+
global $DIC;
49+
if ($DIC->offsetExists('upload_policy_resolver')) {
50+
/** @var $DIC array{upload_policy_resolver: \UploadPolicyResolver} */
51+
return $DIC['upload_policy_resolver']->getUserUploadSizeLimitInBytes();
52+
}
53+
return null;
54+
}
55+
};
56+
3557
$contribute[\ILIAS\Setup\Agent::class] = static fn() =>
3658
new \ilFileServicesSetupAgent(
3759
$pull[\ILIAS\Refinery\Factory::class]

components/ILIAS/Help/Help.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public function init(
3232
array | \ArrayAccess &$pull,
3333
array | \ArrayAccess &$internal,
3434
): void {
35+
$implement[UI\HelpTextRetriever::class] = static fn() =>
36+
new \ilHelpUITextRetriever();
37+
3538
$contribute[\ILIAS\Setup\Agent::class] = static fn() =>
3639
new \ILIAS\Help\Setup\Agent(
3740
$pull[\ILIAS\Refinery\Factory::class]

components/ILIAS/Init/Init.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,55 @@ public function init(
5858

5959
$contribute[Component\Resource\PublicAsset::class] = fn() =>
6060
new Component\Resource\OfComponent($this, ".htaccess", ".");
61+
62+
$contribute[Component\EntryPoint::class] = static fn() =>
63+
new Init\LegacyInitialisationAdapter(
64+
$pull[\ILIAS\Refinery\Factory::class],
65+
$pull[\ILIAS\Data\Factory::class],
66+
$use[\ILIAS\UI\Factory::class],
67+
$use[\ILIAS\UI\Renderer::class],
68+
$pull[\ILIAS\UI\Implementation\Component\Counter\Factory::class],
69+
$pull[\ILIAS\UI\Implementation\Component\Button\Factory::class],
70+
$pull[\ILIAS\UI\Implementation\Component\Listing\Factory::class],
71+
$pull[\ILIAS\UI\Implementation\Component\Image\Factory::class],
72+
$pull[\ILIAS\UI\Implementation\Component\Panel\Factory::class],
73+
$pull[\ILIAS\UI\Implementation\Component\Modal\Factory::class],
74+
$pull[\ILIAS\UI\Implementation\Component\Dropzone\Factory::class],
75+
$pull[\ILIAS\UI\Implementation\Component\Popover\Factory::class],
76+
$pull[\ILIAS\UI\Implementation\Component\Divider\Factory::class],
77+
$pull[\ILIAS\UI\Implementation\Component\Link\Factory::class],
78+
$pull[\ILIAS\UI\Implementation\Component\Dropdown\Factory::class],
79+
$pull[\ILIAS\UI\Implementation\Component\Item\Factory::class],
80+
$pull[\ILIAS\UI\Implementation\Component\ViewControl\Factory::class],
81+
$pull[\ILIAS\UI\Implementation\Component\Chart\Factory::class],
82+
$pull[\ILIAS\UI\Implementation\Component\Input\Factory::class],
83+
$pull[\ILIAS\UI\Implementation\Component\Table\Factory::class],
84+
$pull[\ILIAS\UI\Implementation\Component\MessageBox\Factory::class],
85+
$pull[\ILIAS\UI\Implementation\Component\Card\Factory::class],
86+
$pull[\ILIAS\UI\Implementation\Component\Layout\Factory::class],
87+
$pull[\ILIAS\UI\Implementation\Component\MainControls\Factory::class],
88+
$pull[\ILIAS\UI\Implementation\Component\Tree\Factory::class],
89+
$pull[\ILIAS\UI\Implementation\Component\Menu\Factory::class],
90+
$pull[\ILIAS\UI\Implementation\Component\Symbol\Factory::class],
91+
$pull[\ILIAS\UI\Implementation\Component\Toast\Factory::class],
92+
$pull[\ILIAS\UI\Implementation\Component\Legacy\Factory::class],
93+
$pull[\ILIAS\UI\Implementation\Component\Launcher\Factory::class],
94+
$pull[\ILIAS\UI\Implementation\Component\Entity\Factory::class],
95+
$pull[\ILIAS\UI\Implementation\Component\Panel\Listing\Factory::class],
96+
$pull[\ILIAS\UI\Implementation\Component\Modal\InterruptiveItem\Factory::class],
97+
$pull[\ILIAS\UI\Implementation\Component\Chart\ProgressMeter\Factory::class],
98+
$pull[\ILIAS\UI\Implementation\Component\Chart\Bar\Factory::class],
99+
$pull[\ILIAS\UI\Implementation\Component\Input\ViewControl\Factory::class],
100+
$pull[\ILIAS\UI\Implementation\Component\Input\Container\ViewControl\Factory::class],
101+
$pull[\ILIAS\UI\Implementation\Component\Table\Column\Factory::class],
102+
$pull[\ILIAS\UI\Implementation\Component\Table\Factory::class],
103+
$pull[\ILIAS\UI\Implementation\Component\MainControls\Slate\Factory::class],
104+
$pull[\ILIAS\UI\Implementation\Component\Symbol\Icon\Factory::class],
105+
$pull[\ILIAS\UI\Implementation\Component\Symbol\Glyph\Factory::class],
106+
$pull[\ILIAS\UI\Implementation\Component\Symbol\Avatar\Factory::class],
107+
$pull[\ILIAS\UI\Implementation\Component\Input\Container\Form\Factory::class],
108+
$pull[\ILIAS\UI\Implementation\Component\Input\Container\Filter\Factory::class],
109+
$pull[\ILIAS\UI\Implementation\Component\Input\Field\Factory::class],
110+
);
61111
}
62112
}

0 commit comments

Comments
 (0)