ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
AuthPageEditorContext.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 {
25  case LOGIN = 'login_editor';
26  case LOGOUT = 'logout_editor';
27 
28  public function pageLanguageIdentifier(bool $plural = false): string
29  {
30  if ($this === self::LOGIN) {
31  return $plural ? 'login_pages' : 'login_page';
32  }
33 
34  return $plural ? 'logout_pages' : 'logout_page';
35  }
36 
37  public function tabIdentifier(): string
38  {
39  return match ($this) {
40  self::LOGIN => 'auth_login_editor',
41  self::LOGOUT => 'logout_editor',
42  };
43  }
44 
45  public function pageType(): string
46  {
47  return match ($this) {
48  self::LOGIN => \ilLoginPage::class::PAGE_TYPE,
49  self::LOGOUT => \ilLogoutPage::class::PAGE_TYPE,
50  };
51  }
52 
56  public function pageClass(): string
57  {
58  return match ($this) {
59  self::LOGIN => \ilLoginPage::class,
60  self::LOGOUT => \ilLogoutPage::class,
61  };
62  }
63 
67  public function pageUiClass(): string
68  {
69  return match ($this) {
70  self::LOGIN => \ilLoginPageGUI::class,
71  self::LOGOUT => \ilLogoutPageGUI::class,
72  };
73  }
74 }