‪TYPO3CMS  10.4
DashboardPreset.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 
18 namespace ‪TYPO3\CMS\Dashboard;
19 
21 
26 {
30  protected ‪$identifier;
31 
35  protected ‪$title;
36 
40  protected ‪$iconIdentifier;
41 
45  protected ‪$description = '';
46 
50  protected ‪$defaultWidgets = [];
51 
55  protected ‪$showInWizard = true;
56 
57  public function ‪__construct(
58  string ‪$identifier,
59  string ‪$title,
60  string ‪$description,
61  string ‪$iconIdentifier = 'content-dashboard',
62  array ‪$defaultWidgets = [],
63  bool ‪$showInWizard = true
64  ) {
65  $this->identifier = ‪$identifier;
66  $this->title = ‪$title;
67  $this->description = ‪$description;
68  $this->iconIdentifier = ‪$iconIdentifier ?: 'content-dashboard';
69  $this->defaultWidgets = ‪$defaultWidgets;
70  $this->showInWizard = ‪$showInWizard;
71  }
72 
76  public function ‪getIdentifier(): string
77  {
79  }
80 
84  public function ‪getIconIdentifier(): string
85  {
87  }
88 
92  public function ‪getTitle(): string
93  {
94  return $this->‪getLanguageService()->‪sL($this->title) ?: ‪$this->title;
95  }
99  public function ‪getDescription(): string
100  {
101  return $this->‪getLanguageService()->‪sL($this->description) ?: ‪$this->description;
102  }
103 
107  public function ‪getDefaultWidgets(): array
108  {
110  }
111 
115  public function ‪isShowInWizard(): bool
116  {
118  }
119 
123  protected function ‪getLanguageService(): ‪LanguageService
124  {
125  return ‪$GLOBALS['LANG'];
126  }
127 }
‪TYPO3\CMS\Dashboard\DashboardPreset
Definition: DashboardPreset.php:26
‪TYPO3\CMS\Dashboard\DashboardPreset\$defaultWidgets
‪string[] $defaultWidgets
Definition: DashboardPreset.php:45
‪TYPO3\CMS\Dashboard\DashboardPreset\__construct
‪__construct(string $identifier, string $title, string $description, string $iconIdentifier='content-dashboard', array $defaultWidgets=[], bool $showInWizard=true)
Definition: DashboardPreset.php:51
‪TYPO3\CMS\Dashboard\DashboardPreset\$showInWizard
‪bool $showInWizard
Definition: DashboardPreset.php:49
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:194
‪TYPO3\CMS\Dashboard\DashboardPreset\getIdentifier
‪string getIdentifier()
Definition: DashboardPreset.php:70
‪TYPO3\CMS\Dashboard\DashboardPreset\getDefaultWidgets
‪string[] getDefaultWidgets()
Definition: DashboardPreset.php:101
‪TYPO3\CMS\Dashboard\DashboardPreset\getTitle
‪string getTitle()
Definition: DashboardPreset.php:86
‪TYPO3\CMS\Dashboard\DashboardPreset\isShowInWizard
‪bool isShowInWizard()
Definition: DashboardPreset.php:109
‪TYPO3\CMS\Dashboard\DashboardPreset\getLanguageService
‪LanguageService getLanguageService()
Definition: DashboardPreset.php:117
‪TYPO3\CMS\Dashboard\DashboardPreset\$description
‪string $description
Definition: DashboardPreset.php:41
‪TYPO3\CMS\Dashboard\DashboardPreset\$iconIdentifier
‪string $iconIdentifier
Definition: DashboardPreset.php:37
‪TYPO3\CMS\Dashboard\DashboardPreset\$title
‪string $title
Definition: DashboardPreset.php:33
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Dashboard\DashboardPreset\getDescription
‪string getDescription()
Definition: DashboardPreset.php:93
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Dashboard\DashboardPreset\$identifier
‪string $identifier
Definition: DashboardPreset.php:29
‪TYPO3\CMS\Dashboard\DashboardPreset\getIconIdentifier
‪string getIconIdentifier()
Definition: DashboardPreset.php:78
‪TYPO3\CMS\Dashboard