ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
LogoutDestinations.php
Go to the documentation of this file.
1 <?php
2 
20 declare(strict_types=1);
21 
23 
24 use ILIAS\Data\URI;
25 use ilCtrlInterface;
26 use ilStartUpGUI;
27 
28 enum LogoutDestinations: string
29 {
30  case LOGIN_SCREEN = 'login_screen';
31  case LOGOUT_SCREEN = 'logout_screen';
32 
33  public function asURI(ilCtrlInterface $ctrl, string $http_path = ILIAS_HTTP_PATH): URI
34  {
35  return match ($this) {
36  self::LOGIN_SCREEN => new URI(
37  $http_path .
38  '/' . $ctrl->getLinkTargetByClass(ilStartUpGUI::class, 'showLoginPage')
39  ),
40  self::LOGOUT_SCREEN => new URI(
41  $http_path .
42  '/' . $ctrl->getLinkTargetByClass(ilStartUpGUI::class, 'showLogout')
43  ),
44  };
45  }
46 }
The scope of this class is split ilias-conform URI&#39;s into components.
Definition: URI.php:34
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
Returns a link target for the given information.