‪TYPO3CMS  ‪main
BeforeModuleCreationEvent.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 
24 {
25  public function ‪__construct(private readonly string ‪$identifier, private array $configuration) {}
26 
27  public function ‪getIdentifier(): string
28  {
29  return ‪$this->identifier;
30  }
31 
32  public function ‪getConfiguration(): array
33  {
34  return $this->configuration;
35  }
36 
37  public function ‪setConfiguration(array $configuration): void
38  {
39  $this->configuration = $configuration;
40  }
41 
42  public function ‪hasConfigurationValue(string $key): bool
43  {
44  return isset($this->configuration[$key]);
45  }
46 
47  public function ‪getConfigurationValue(string $key, mixed $default = null): mixed
48  {
49  return $this->configuration[$key] ?? $default;
50  }
51 
52  public function ‪setConfigurationValue(string $key, mixed $value): void
53  {
54  $this->configuration[$key] = $value;
55  }
56 }
‪TYPO3\CMS\Backend\Module\BeforeModuleCreationEvent\getConfiguration
‪getConfiguration()
Definition: BeforeModuleCreationEvent.php:32
‪TYPO3\CMS\Backend\Module\BeforeModuleCreationEvent\setConfigurationValue
‪setConfigurationValue(string $key, mixed $value)
Definition: BeforeModuleCreationEvent.php:52
‪TYPO3\CMS\Backend\Module\BeforeModuleCreationEvent\getConfigurationValue
‪getConfigurationValue(string $key, mixed $default=null)
Definition: BeforeModuleCreationEvent.php:47
‪TYPO3\CMS\Backend\Module\BeforeModuleCreationEvent\getIdentifier
‪getIdentifier()
Definition: BeforeModuleCreationEvent.php:27
‪TYPO3\CMS\Backend\Module\BeforeModuleCreationEvent
Definition: BeforeModuleCreationEvent.php:24
‪TYPO3\CMS\Backend\Module\BeforeModuleCreationEvent\setConfiguration
‪setConfiguration(array $configuration)
Definition: BeforeModuleCreationEvent.php:37
‪TYPO3\CMS\Backend\Module\BeforeModuleCreationEvent\__construct
‪__construct(private readonly string $identifier, private array $configuration)
Definition: BeforeModuleCreationEvent.php:25
‪TYPO3\CMS\Backend\Module\BeforeModuleCreationEvent\hasConfigurationValue
‪hasConfigurationValue(string $key)
Definition: BeforeModuleCreationEvent.php:42
‪TYPO3\CMS\Backend\Module
Definition: BaseModule.php:18
‪TYPO3\CMS\Webhooks\Message\$identifier
‪identifier readonly string $identifier
Definition: FileAddedMessage.php:37