ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
CalendarStaticURLHandler.php
Go to the documentation of this file.
1<?php
19
28
29class CalendarStaticURLHandler extends BaseHandler implements Handler
30{
31 private const CALENDAR_NAMESPACE = 'calendar';
32
33 private const BOOKINGS = 'bookings';
34
35
36 public function buildConsultationHoursURI(): URI
37 {
38 global $DIC;
40 $static_url = $DIC['static_url'];
41 return $static_url->builder()->build(
42 self::CALENDAR_NAMESPACE,
43 null,
44 [
45 self::BOOKINGS
46 ]
47 );
48 }
49
50 public function getNamespace(): string
51 {
53 }
54
55 public function handle(Request $request, Context $context, Factory $response_factory): Response
56 {
57 $additional_params = $request->getAdditionalParameters()[0] ?? '';
58 $uri = match ($additional_params) {
59 self::BOOKINGS => $context->ctrl()->getLinkTargetByClass(
60 [
61 \ilDashboardGUI::class,
62 \ilCalendarPresentationGUI::class,
63 \ilConsultationHoursGUI::class
64 ],
65 'appointments'
66 ),
67 default => $context->ctrl()->getLinkTargetByClass(
68 [
69 \ilDashboardGUI::class
70 ],
71 ''
72 )
73 };
74 return $response_factory->can($uri);
75 }
76}
handle(Request $request, Context $context, Factory $response_factory)
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
Class Services.
Definition: Services.php:38
$static_url
Definition: goto.php:29
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26
$context
Definition: webdav.php:31