‪TYPO3CMS  ‪main
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 {
30  public function ‪getIdentifier(): string
31  {
32  return 'tsdebug';
33  }
34 
35  public function ‪getIconIdentifier(): string
36  {
37  return 'mimetypes-x-content-template-static';
38  }
39 
40  public function ‪getLabel(): string
41  {
42  return $this->‪getLanguageService()->sL(
43  'LLL:EXT:adminpanel/Resources/Private/Language/locallang_tsdebug.xlf:module.label'
44  );
45  }
46 
47  public function ‪getShortInfo(): string
48  {
49  $messageCount = 0;
50  foreach ($this->‪getTimeTracker()->getTypoScriptLogStack() as $log) {
51  $messageCount += count($log['message'] ?? []);
52  }
53  return sprintf(
54  $this->‪getLanguageService()->sL(
55  'LLL:EXT:adminpanel/Resources/Private/Language/locallang_tsdebug.xlf:module.shortinfo'
56  ),
57  $messageCount
58  );
59  }
60 
61  protected function ‪getTimeTracker(): ‪TimeTracker
62  {
63  return GeneralUtility::makeInstance(TimeTracker::class);
64  }
65 }
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getIconIdentifier
‪getIconIdentifier()
Definition: TsDebugModule.php:35
‪TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule
Definition: AbstractModule.php:29
‪TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule\getLanguageService
‪getLanguageService()
Definition: AbstractModule.php:95
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule
Definition: TsDebugModule.php:29
‪TYPO3\CMS\Adminpanel\ModuleApi\ShortInfoProviderInterface
Definition: ShortInfoProviderInterface.php:30
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getShortInfo
‪getShortInfo()
Definition: TsDebugModule.php:47
‪TYPO3\CMS\Adminpanel\Modules
Definition: CacheModule.php:18
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getTimeTracker
‪getTimeTracker()
Definition: TsDebugModule.php:61
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getLabel
‪getLabel()
Definition: TsDebugModule.php:40
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Core\TimeTracker\TimeTracker
Definition: TimeTracker.php:34
‪TYPO3\CMS\Adminpanel\Modules\TsDebugModule\getIdentifier
‪getIdentifier()
Definition: TsDebugModule.php:30