‪TYPO3CMS  ‪main
AddonRegistry.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 
22 
28 {
32  protected ‪$registeredAddons = [];
33 
37  public function register(‪Addon $addon): ‪AddonRegistry
38  {
39  $this->registeredAddons[] = $addon;
40 
41  return $this;
42  }
43 
44  public function ‪getAddons(): array
45  {
47  }
48 
52  public function ‪compileSettings(array $addons): array
53  {
54  $settings = [];
55  foreach ($addons as $addon) {
56  $settings = array_merge($settings, $addon->getOptions());
57  }
58 
59  return $settings;
60  }
61 }
‪TYPO3\CMS\Backend\CodeEditor\Registry\AddonRegistry
Definition: AddonRegistry.php:28
‪TYPO3\CMS\Backend\CodeEditor\Registry
Definition: AddonRegistry.php:18
‪TYPO3\CMS\Backend\CodeEditor\Registry\AddonRegistry\getAddons
‪getAddons()
Definition: AddonRegistry.php:43
‪TYPO3\CMS\Backend\CodeEditor\Addon
Definition: Addon.php:27
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪TYPO3\CMS\Backend\CodeEditor\Registry\AddonRegistry\$registeredAddons
‪Addon[] $registeredAddons
Definition: AddonRegistry.php:31
‪TYPO3\CMS\Backend\CodeEditor\Registry\AddonRegistry\compileSettings
‪compileSettings(array $addons)
Definition: AddonRegistry.php:51