‪TYPO3CMS  10.4
DocHeaderComponent.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 
19 
24 {
30  protected ‪$menuRegistry;
31 
37  protected ‪$metaInformation;
38 
44  protected ‪$buttonBar;
45 
49  protected ‪$enabled = true;
50 
54  public function ‪__construct()
55  {
56  $this->buttonBar = GeneralUtility::makeInstance(ButtonBar::class);
57  $this->menuRegistry = GeneralUtility::makeInstance(MenuRegistry::class);
58  $this->metaInformation = GeneralUtility::makeInstance(MetaInformation::class);
59  }
60 
66  public function ‪setMetaInformation(array ‪$metaInformation)
67  {
68  $this->metaInformation->setRecordArray(‪$metaInformation);
69  }
70 
76  public function ‪getMenuRegistry()
77  {
79  }
80 
86  public function ‪getButtonBar()
87  {
88  return ‪$this->buttonBar;
89  }
90 
96  public function ‪isEnabled()
97  {
98  return ‪$this->enabled;
99  }
100 
104  public function ‪enable()
105  {
106  $this->enabled = true;
107  }
108 
112  public function ‪disable()
113  {
114  $this->enabled = false;
115  }
116 
122  public function ‪docHeaderContent()
123  {
124  return [
125  'enabled' => $this->‪isEnabled(),
126  'buttons' => $this->buttonBar->getButtons(),
127  'menus' => $this->menuRegistry->getMenus(),
128  'metaInformation' => ‪$this->metaInformation
129  ];
130  }
131 }
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\setMetaInformation
‪setMetaInformation(array $metaInformation)
Definition: DocHeaderComponent.php:62
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\$enabled
‪bool $enabled
Definition: DocHeaderComponent.php:45
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent
Definition: DocHeaderComponent.php:24
‪TYPO3\CMS\Backend\Template\Components\ButtonBar
Definition: ButtonBar.php:32
‪TYPO3\CMS\Backend\Template\Components\MenuRegistry
Definition: MenuRegistry.php:25
‪TYPO3\CMS\Backend\Template\Components\MetaInformation
Definition: MetaInformation.php:32
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\isEnabled
‪bool isEnabled()
Definition: DocHeaderComponent.php:92
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\enable
‪enable()
Definition: DocHeaderComponent.php:100
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\$buttonBar
‪ButtonBar $buttonBar
Definition: DocHeaderComponent.php:41
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\$metaInformation
‪MetaInformation $metaInformation
Definition: DocHeaderComponent.php:35
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\getMenuRegistry
‪MenuRegistry getMenuRegistry()
Definition: DocHeaderComponent.php:72
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\getButtonBar
‪ButtonBar getButtonBar()
Definition: DocHeaderComponent.php:82
‪TYPO3\CMS\Backend\Template\Components
Definition: AbstractControl.php:16
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\__construct
‪__construct()
Definition: DocHeaderComponent.php:50
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\docHeaderContent
‪array docHeaderContent()
Definition: DocHeaderComponent.php:118
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\$menuRegistry
‪MenuRegistry $menuRegistry
Definition: DocHeaderComponent.php:29
‪TYPO3\CMS\Backend\Template\Components\DocHeaderComponent\disable
‪disable()
Definition: DocHeaderComponent.php:108