‪TYPO3CMS  10.4
TsDebugModule.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
24 
29 {
33  public function ‪getIdentifier(): string
34  {
35  return 'tsdebug';
36  }
37 
41  public function ‪getIconIdentifier(): string
42  {
43  return 'mimetypes-x-content-template-static';
44  }
45 
49  public function ‪getLabel(): string
50  {
51  return $this->‪getLanguageService()->‪sL(
52  'LLL:EXT:adminpanel/Resources/Private/Language/locallang_tsdebug.xlf:module.label'
53  );
54  }
55 
59  public function ‪getShortInfo(): string
60  {
61  $messageCount = 0;
62  foreach ($this->‪getTimeTracker()->tsStackLog as $log) {
63  $messageCount += count($log['message'] ?? []);
64  }
65  return sprintf(
66  $this->‪getLanguageService()->sL(
67  'LLL:EXT:adminpanel/Resources/Private/Language/locallang_tsdebug.xlf:module.shortinfo'
68  ),
69  $messageCount
70  );
71  }
72 
76  protected function ‪getTimeTracker(): ‪TimeTracker
77  {
78  return GeneralUtility::makeInstance(TimeTracker::class);
79  }
80 }
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getIconIdentifier
‪getIconIdentifier()
Definition: TsDebugModule.php:41
‪TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule
Definition: AbstractModule.php:31
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:194
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule
Definition: TsDebugModule.php:29
‪TYPO3\CMS\Adminpanel\ModuleApi\ShortInfoProviderInterface
Definition: ShortInfoProviderInterface.php:30
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getTimeTracker
‪TimeTracker getTimeTracker()
Definition: TsDebugModule.php:76
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getShortInfo
‪getShortInfo()
Definition: TsDebugModule.php:59
‪TYPO3\CMS\Adminpanel\Modules
Definition: CacheModule.php:18
‪TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule\getLanguageService
‪LanguageService getLanguageService()
Definition: AbstractModule.php:121
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getLabel
‪getLabel()
Definition: TsDebugModule.php:49
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\TimeTracker\TimeTracker
Definition: TimeTracker.php:30
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getIdentifier
‪getIdentifier()
Definition: TsDebugModule.php:33