‪TYPO3CMS  ‪main
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  public function ‪__construct(
31  protected readonly string ‪$identifier,
32  protected readonly string $title,
33  protected readonly string $description,
34  protected readonly string $iconIdentifier = 'content-dashboard',
35  protected readonly array $defaultWidgets = [],
36  protected readonly bool $showInWizard = true
37  ) {}
38 
39  public function ‪getIdentifier(): string
40  {
41  return ‪$this->identifier;
42  }
43 
44  public function ‪getIconIdentifier(): string
45  {
46  return $this->iconIdentifier;
47  }
48 
49  public function ‪getTitle(): string
50  {
51  return $this->‪getLanguageService()->sL($this->title) ?: $this->title;
52  }
53  public function ‪getDescription(): string
54  {
55  return $this->‪getLanguageService()->sL($this->‪description) ?: $this->description;
56  }
57 
61  public function ‪getDefaultWidgets(): array
62  {
63  return $this->defaultWidgets;
64  }
65 
66  public function ‪isShowInWizard(): bool
67  {
68  return $this->showInWizard;
69  }
70 
72  {
73  return ‪$GLOBALS['LANG'];
74  }
75 }
‪TYPO3\CMS\Dashboard\DashboardPreset
Definition: DashboardPreset.php:26
‪TYPO3\CMS\Dashboard\DashboardPreset\getIconIdentifier
‪getIconIdentifier()
Definition: DashboardPreset.php:44
‪TYPO3\CMS\Dashboard\DashboardPreset\getIdentifier
‪getIdentifier()
Definition: DashboardPreset.php:39
‪TYPO3\CMS\Dashboard\DashboardPreset\getTitle
‪getTitle()
Definition: DashboardPreset.php:49
‪TYPO3\CMS\Dashboard\DashboardPreset\__construct
‪__construct(protected readonly string $identifier, protected readonly string $title, protected readonly string $description, protected readonly string $iconIdentifier='content-dashboard', protected readonly array $defaultWidgets=[], protected readonly bool $showInWizard=true)
Definition: DashboardPreset.php:30
‪TYPO3\CMS\Dashboard\DashboardPreset\getDefaultWidgets
‪string[] getDefaultWidgets()
Definition: DashboardPreset.php:61
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:46
‪TYPO3\CMS\Redirects\Message\description
‪identifier description
Definition: RedirectWasHitMessage.php:32
‪TYPO3\CMS\Dashboard\DashboardPreset\isShowInWizard
‪isShowInWizard()
Definition: DashboardPreset.php:66
‪TYPO3\CMS\Dashboard
‪TYPO3\CMS\Dashboard\DashboardPreset\getDescription
‪getDescription()
Definition: DashboardPreset.php:53
‪TYPO3\CMS\Dashboard\DashboardPreset\getLanguageService
‪getLanguageService()
Definition: DashboardPreset.php:71
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37