‪TYPO3CMS  ‪main
BackendLayout.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 
25 {
29  protected ‪$identifier;
30 
34  protected ‪$title;
35 
39  protected ‪$description;
40 
44  protected ‪$iconPath;
45 
49  protected ‪$configuration;
50 
56  protected ‪$structure = [];
57 
61  protected ‪$data;
62 
69  public static function ‪create(‪$identifier, ‪$title, ‪$configuration)
70  {
71  return GeneralUtility::makeInstance(
72  static::class,
74  ‪$title,
76  );
77  }
78 
85  {
87  $this->‪setTitle(‪$title);
88  if (is_array(‪$configuration)) {
89  $this->structure = ‪$configuration;
90  $this->configuration = ‪$configuration['config'] ?? '';
91  } else {
93  }
94  }
95 
99  public function ‪getIdentifier()
100  {
102  }
103 
108  public function ‪setIdentifier(‪$identifier)
109  {
110  if (str_contains(‪$identifier, '__')) {
111  throw new \UnexpectedValueException(
112  'Identifier "' . ‪$identifier . '" must not contain "__"',
113  1381597630
114  );
115  }
116 
117  $this->identifier = ‪$identifier;
118  }
119 
123  public function ‪getTitle()
124  {
125  return ‪$this->title;
126  }
127 
131  public function ‪setTitle(‪$title)
132  {
133  $this->title = ‪$title;
134  }
135 
139  public function ‪getDescription()
140  {
141  return ‪$this->description;
142  }
143 
147  public function ‪setDescription(‪$description)
148  {
150  }
151 
155  public function ‪getIconPath()
156  {
157  return ‪$this->iconPath;
158  }
159 
163  public function ‪setIconPath(‪$iconPath)
164  {
165  $this->iconPath = ‪$iconPath;
166  }
167 
171  public function ‪getConfiguration()
172  {
174  }
175 
179  public function ‪setConfiguration(‪$configuration)
180  {
181  $this->configuration = ‪$configuration;
182  $this->structure = GeneralUtility::makeInstance(BackendLayoutView::class)->parseStructure($this);
183  }
184 
191  public function ‪getUsedColumns(): array
192  {
193  return $this->structure['usedColumns'] ?? [];
194  }
195 
196  public function ‪getColCount(): int
197  {
198  return $this->structure['colCount'] ?? 0;
199  }
200 
201  public function ‪getRowCount(): int
202  {
203  return $this->structure['rowCount'] ?? 0;
204  }
205 
209  public function ‪getData()
210  {
211  return ‪$this->data;
212  }
213 
214  public function ‪setData(array ‪$data)
215  {
216  $this->data = ‪$data;
217  }
218 
219  public function ‪setStructure(array ‪$structure)
220  {
221  $this->structure = ‪$structure;
222  }
223 
224  public function ‪getStructure(): array
225  {
226  return ‪$this->structure;
227  }
228 
232  public function ‪getColumnPositionNumbers(): array
233  {
234  return $this->structure['__colPosList'];
235  }
236 }
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\$data
‪array $data
Definition: BackendLayout.php:54
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getIdentifier
‪string getIdentifier()
Definition: BackendLayout.php:92
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getIconPath
‪string getIconPath()
Definition: BackendLayout.php:148
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getColumnPositionNumbers
‪string[] getColumnPositionNumbers()
Definition: BackendLayout.php:225
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\$iconPath
‪string $iconPath
Definition: BackendLayout.php:40
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getStructure
‪getStructure()
Definition: BackendLayout.php:217
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getColCount
‪getColCount()
Definition: BackendLayout.php:189
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\setDescription
‪setDescription($description)
Definition: BackendLayout.php:140
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\$configuration
‪string $configuration
Definition: BackendLayout.php:44
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getData
‪array getData()
Definition: BackendLayout.php:202
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getRowCount
‪getRowCount()
Definition: BackendLayout.php:194
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\setData
‪setData(array $data)
Definition: BackendLayout.php:207
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getDescription
‪string getDescription()
Definition: BackendLayout.php:132
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\__construct
‪__construct($identifier, $title, $configuration)
Definition: BackendLayout.php:77
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\create
‪static BackendLayout create($identifier, $title, $configuration)
Definition: BackendLayout.php:62
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getConfiguration
‪string getConfiguration()
Definition: BackendLayout.php:164
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getUsedColumns
‪getUsedColumns()
Definition: BackendLayout.php:184
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\setIconPath
‪setIconPath($iconPath)
Definition: BackendLayout.php:156
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\setConfiguration
‪setConfiguration($configuration)
Definition: BackendLayout.php:172
‪TYPO3\CMS\Backend\View\BackendLayout
Definition: BackendLayout.php:16
‪TYPO3\CMS\Backend\View\BackendLayoutView
Definition: BackendLayoutView.php:38
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\setIdentifier
‪setIdentifier($identifier)
Definition: BackendLayout.php:101
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\$identifier
‪string $identifier
Definition: BackendLayout.php:28
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout
Definition: BackendLayout.php:25
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\$description
‪string $description
Definition: BackendLayout.php:36
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\getTitle
‪string getTitle()
Definition: BackendLayout.php:116
‪TYPO3\CMS\Redirects\Message\description
‪identifier description
Definition: RedirectWasHitMessage.php:32
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\setTitle
‪setTitle($title)
Definition: BackendLayout.php:124
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\$title
‪string $title
Definition: BackendLayout.php:32
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\setStructure
‪setStructure(array $structure)
Definition: BackendLayout.php:212
‪TYPO3\CMS\Backend\View\BackendLayout\BackendLayout\$structure
‪array $structure
Definition: BackendLayout.php:50