ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
StaticUrlHandler.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29
30class StaticUrlHandler extends BaseHandler implements Handler
31{
32 public const string NAMESPACE = 'registration';
33
34 public function getNamespace(): string
35 {
36 return self::NAMESPACE;
37 }
38
39 public function handle(Request $request, Context $context, Factory $response_factory): Response
40 {
41 $registration_settings = new \ilRegistrationSettings();
42 if ($registration_settings->getRegistrationType() === \ilRegistrationSettings::IL_REG_DISABLED) {
43 return $response_factory->cannot();
44 }
45
46 return $response_factory->can($context->ctrl()->getLinkTargetByClass(
47 [
48 \ilStartUpGUI::class,
49 \ilAccountRegistrationGUI::class
50 ]
51 ));
52 }
53}
handle(Request $request, Context $context, Factory $response_factory)
can(string $uri_path, bool $shift=false)
The Handler successfully resolved the target.
Definition: Factory.php:88
cannot()
The Handler cannot process the given Request at all, e.g.
Definition: Factory.php:47