‪TYPO3CMS  10.4
Permission.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
23 final class ‪Permission extends ‪Enumeration
24 {
28  const ‪NOTHING = 0;
29 
33  const ‪PAGE_SHOW = 1;
34 
38  const ‪PAGE_EDIT = 2;
39 
43  const ‪PAGE_DELETE = 4;
44 
48  const ‪PAGE_NEW = 8;
49 
53  const ‪CONTENT_EDIT = 16;
54 
58  const ‪ALL = 31;
59 
67  public static function ‪getMap(): array
68  {
69  return [
70  'show' => static::PAGE_SHOW,
71  // 1st bit
72  'edit' => static::PAGE_EDIT,
73  // 2nd bit
74  'delete' => static::PAGE_DELETE,
75  // 3rd bit
76  'new' => static::PAGE_NEW,
77  // 4th bit
78  'editcontent' => static::CONTENT_EDIT
79  ];
80  }
81 }
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_NEW
‪const PAGE_NEW
Definition: Permission.php:48
‪TYPO3\CMS\Core\Type\Bitmask\Permission\NOTHING
‪const NOTHING
Definition: Permission.php:28
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:24
‪TYPO3\CMS\Core\Type\Bitmask\Permission\ALL
‪const ALL
Definition: Permission.php:58
‪TYPO3\CMS\Core\Type\Bitmask\Permission\getMap
‪static array getMap()
Definition: Permission.php:67
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW
‪const PAGE_SHOW
Definition: Permission.php:33
‪TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT
‪const CONTENT_EDIT
Definition: Permission.php:53
‪TYPO3\CMS\Core\Type\Enumeration
Definition: Enumeration.php:29
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT
‪const PAGE_EDIT
Definition: Permission.php:38
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_DELETE
‪const PAGE_DELETE
Definition: Permission.php:43
‪TYPO3\CMS\Core\Type\Bitmask
Definition: JsConfirmation.php:16