19 declare(strict_types=1);
54 $this->routing = $routing ??
new Routing(
55 $this->container->ctrl(),
64 return new Provide($id, $this->
internal, $this->container);
70 $id = $this->container->http()->wrapper()->query()->retrieve(
'withdraw_consent', $this->container->refinery()->to()->string());
75 $logout = $this->
internal->get(
'logout',
$id);
76 if (null !== $logout) {
77 $this->container->ctrl()->setParameterByClass($gui,
'withdraw_from',
$id);
84 $create = $this->
internal->get(
'show-on-login-page', $id);
88 return $this->container->ui()->renderer()->render($create());
94 $id = $this->container->http()->wrapper()->query()->retrieve(
'withdraw_from', $this->container->refinery()->to()->string());
99 $logout_text = $this->
internal->get(
'logout-text',
$id);
101 return null === $logout_text ?
'' : $this->container->ui()->renderer()->render($logout_text());
109 public function agree(
string $gui,
string $cmd): void
116 $key = ilLegalDocumentsAgreementGUI::class === $gui ?
'agreement-form' :
'public-page';
119 if (!$result->isOk() && $result->error() ===
'Not available.') {
120 $this->routing->redirectToOriginalTarget();
123 return $result->value();
126 public function withdraw(
string $gui,
string $cmd): void
137 $filters = $this->
internal->all(
'filter-online-users');
139 $visible_users = array_reduce(
141 fn($users, $only_visible_users) => $only_visible_users($users),
145 return array_values(array_diff($users, $visible_users));
150 return $this->container->refinery()->in()->series(array_values($this->internal->all(
'constrain-internal-mail')));
155 return $this->container->refinery()->in()->series(array_values($this->internal->all(
'use-soap-api')));
160 array_map(fn($proc) => $proc(), $this->internal->all(
'after-login'));
169 fn($goto_link) => $goto_link->name() === $goto_target,
170 $this->
internal->all(
'goto')
171 )->map(fn($goto_link) => $goto_link->target());
176 return $this->
internal->all(
'intercept');
181 return new Bundle($this->internal->all(
'self-registration'));
187 $this->internal->all(
'user-management-fields'),
188 static fn(array $prev, callable
$f): array => [...$prev, ...$f($user)],
203 foreach ($array as $x) {
204 if ($predicate($x)) {
209 return new Error(
'Not found.');
219 return $this->
find($predicate, $array)->isOk();
229 return !$this->
any(
static fn($x) => !$predicate($x), $array);
235 $id = $this->container->http()->wrapper()->query()->retrieve(
'id', $this->container->refinery()->to()->string());
237 return new Error(
'No provider ID given.');
240 $this->container->ctrl()->setParameterByClass($gui,
'id',
$id);
242 $value = $this->
internal->get($key,
$id);
244 if (null === $value) {
245 return new Error(
'Field not defined.');
248 return new Ok($value);
256 return fn(
Closure $proc) => $proc($gui, $cmd)->map(fn($fragment) => $fragment->render(
257 $this->container->ui()->mainTemplate(),
258 $this->container->ui()->renderer()
264 $this->container->ui()->mainTemplate()->setContent($content);
270 $action =
new UserAction($this->container->user(), $clock);
282 $add_item =
function (
string $id,
string $title,
object $obj) use (&$footer, &$new_links):
void {
283 if ($obj instanceof
Modal) {
286 $new_links[] = $this->container->ui()->factory()->link()->standard($title, (
string) $obj);
290 foreach ($collection as $args) {
296 $new_footer = $this->container->ui()->factory()->mainControls()->footer(array_merge($old_links, $new_links), $footer->
getText());
304 return function (...$args) use ($items) {
This describes commonalities between the different modals.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
readonly Internal $internal
modifyFooter(Footer $footer)
withAdditionalModalAndTrigger(Modal\RoundTrip $roundTripModal, Button\Shy $shyButton)
userCanReadInternalMail()
A result encapsulates a value or an error and simplifies the handling of those.
collectFooterItems(array $items)
find(Closure $predicate, array $array)
A
Customizing of pimple-DIC for ILIAS.
all(Closure $predicate, array $array)
A
static logoutUrl(array $parameters=[])
Return the logout URL with a valid CSRF token.
renderPageFragment(string $gui, string $cmd)
A result encapsulates a value or an error and simplifies the handling of those.
footerBridge(Footer $footer, array $collection)
readonly Routing $routing
__construct(private readonly Container $container, ?Internal $internal=null, Routing $routing=null)
any(Closure $predicate, array $array)
A
setMainTemplateContent(string $content)
static redirectToStartingPage(string $target='')
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
loginPageHTML(string $id)
findGotoLink(string $goto_target)
agree(string $gui, string $cmd)
agreeContent(string $gui, string $cmd)
withdraw(string $gui, string $cmd)
userManagementFields(ilObjUser $user)
usersWithHiddenOnlineStatus(array $users)
This describes the Footer.
byQueryParams(string $gui, string $cmd, string $key)