‪TYPO3CMS  10.4
InformationStatus.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 
24 {
26 
30  const ‪STATUS_NOTICE = '';
31 
35  const ‪STATUS_INFO = 'info';
36 
40  const ‪STATUS_OK = 'success';
41 
45  const ‪STATUS_WARNING = 'warning';
46 
50  const ‪STATUS_ERROR = 'danger';
51 
55  protected static ‪$statusIntegerMap = [
56  self::STATUS_NOTICE => -2,
57  self::STATUS_INFO => -1,
58  self::STATUS_OK => 0,
59  self::STATUS_WARNING => 1,
60  self::STATUS_ERROR => 2
61  ];
62 
69  public function ‪isGreaterThan(‪InformationStatus $status)
70  {
71  return static::$statusIntegerMap[(string)$this] > static::$statusIntegerMap[(string)$status];
72  }
73 }
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\STATUS_INFO
‪const STATUS_INFO
Definition: InformationStatus.php:35
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\isGreaterThan
‪bool isGreaterThan(InformationStatus $status)
Definition: InformationStatus.php:68
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\STATUS_OK
‪const STATUS_OK
Definition: InformationStatus.php:40
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\STATUS_WARNING
‪const STATUS_WARNING
Definition: InformationStatus.php:45
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\STATUS_ERROR
‪const STATUS_ERROR
Definition: InformationStatus.php:50
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus
Definition: InformationStatus.php:24
‪TYPO3\CMS\Backend\Toolbar\Enumeration
Definition: InformationStatus.php:16
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\__default
‪const __default
Definition: InformationStatus.php:25
‪TYPO3\CMS\Core\Type\Enumeration
Definition: Enumeration.php:29
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\$statusIntegerMap
‪static int[] $statusIntegerMap
Definition: InformationStatus.php:54
‪TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus\STATUS_NOTICE
‪const STATUS_NOTICE
Definition: InformationStatus.php:30