‪TYPO3CMS  9.5
DebugModule.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
3 
5 
6 /*
7  * This file is part of the TYPO3 CMS project.
8  *
9  * It is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License, either version 2
11  * of the License, or any later version.
12  *
13  * For the full copyright and license information, please read the
14  * LICENSE.txt file that was distributed with this source code.
15  *
16  * The TYPO3 project - inspiring people to share!
17  */
18 
23 
28 {
29 
33  public function ‪getIdentifier(): string
34  {
35  return 'debug';
36  }
37 
41  public function ‪getIconIdentifier(): string
42  {
43  return 'actions-debug';
44  }
45 
49  public function ‪getLabel(): string
50  {
51  return $this->‪getLanguageService()->‪sL(
52  'LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:module.label'
53  );
54  }
55 
56  public function ‪getShortInfo(): string
57  {
58  $errorsAndWarnings = array_filter(‪InMemoryLogWriter::$log, function (‪LogRecord $entry) {
59  return $entry->‪getLevel() <= 4;
60  });
61  return sprintf($this->‪getLanguageService()->sL(
62  'LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:module.shortinfo'
63  ), count($errorsAndWarnings));
64  }
65 }
‪TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule
Definition: AbstractModule.php:30
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:158
‪TYPO3\CMS\Adminpanel\ModuleApi\ShortInfoProviderInterface
Definition: ShortInfoProviderInterface.php:29
‪TYPO3\CMS\Core\Log\LogRecord
Definition: LogRecord.php:21
‪TYPO3\CMS\Adminpanel\Modules
Definition: CacheModule.php:4
‪TYPO3\CMS\Adminpanel\Modules\DebugModule\getLabel
‪getLabel()
Definition: DebugModule.php:49
‪TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter
Definition: InMemoryLogWriter.php:30
‪TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter\$log
‪static $log
Definition: InMemoryLogWriter.php:31
‪TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule\getLanguageService
‪LanguageService getLanguageService()
Definition: AbstractModule.php:120
‪TYPO3\CMS\Adminpanel\Modules\DebugModule
Definition: DebugModule.php:28
‪TYPO3\CMS\Adminpanel\Modules\DebugModule\getIdentifier
‪getIdentifier()
Definition: DebugModule.php:33
‪TYPO3\CMS\Adminpanel\Modules\DebugModule\getShortInfo
‪getShortInfo()
Definition: DebugModule.php:56
‪TYPO3\CMS\Core\Log\LogRecord\getLevel
‪int getLevel()
Definition: LogRecord.php:164
‪TYPO3\CMS\Adminpanel\Modules\DebugModule\getIconIdentifier
‪getIconIdentifier()
Definition: DebugModule.php:41