‪TYPO3CMS  9.5
AbstractCustomPreset.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
22 {
26  protected ‪$name = 'Custom';
27 
31  protected ‪$isActive = false;
32 
36  protected ‪$priority = 10;
37 
43  public function ‪isActive()
44  {
45  return ‪$this->isActive;
46  }
47 
56  public function ‪setActive()
57  {
58  $this->‪isActive = true;
59  }
60 
66  public function ‪isAvailable()
67  {
68  return true;
69  }
70 
78  public function ‪getConfigurationValues()
79  {
81  foreach ($this->configurationValues as $configurationKey => $configurationValue) {
82  if (isset($this->postValues['enable'])
83  && $this->postValues['enable'] === $this->name
84  && isset($this->postValues[$this->name][$configurationKey])
85  ) {
86  $currentValue = $this->postValues[‪$this->name][$configurationKey];
87  } else {
88  $currentValue = $this->configurationManager->getConfigurationValueByPath($configurationKey);
89  }
90  ‪$configurationValues[$configurationKey] = $currentValue;
91  }
93  }
94 }
‪TYPO3\CMS\Install\Configuration\AbstractCustomPreset\setActive
‪setActive()
Definition: AbstractCustomPreset.php:53
‪TYPO3\CMS\Install\Configuration\AbstractCustomPreset\getConfigurationValues
‪array getConfigurationValues()
Definition: AbstractCustomPreset.php:75
‪TYPO3\CMS\Install\Configuration\AbstractCustomPreset\$priority
‪int $priority
Definition: AbstractCustomPreset.php:33
‪TYPO3\CMS\Install\Configuration\AbstractPreset
Definition: AbstractPreset.php:26
‪TYPO3\CMS\Install\Configuration\AbstractPreset\$configurationValues
‪array $configurationValues
Definition: AbstractPreset.php:41
‪TYPO3\CMS\Install\Configuration
Definition: AbstractCustomPreset.php:2
‪TYPO3\CMS\Install\Configuration\AbstractCustomPreset\$name
‪string $name
Definition: AbstractCustomPreset.php:25
‪TYPO3\CMS\Install\Configuration\AbstractCustomPreset\$isActive
‪bool $isActive
Definition: AbstractCustomPreset.php:29
‪TYPO3\CMS\Install\Configuration\AbstractCustomPreset\isActive
‪bool isActive()
Definition: AbstractCustomPreset.php:40
‪TYPO3\CMS\Install\Configuration\AbstractCustomPreset\isAvailable
‪bool isAvailable()
Definition: AbstractCustomPreset.php:63
‪TYPO3\CMS\Install\Configuration\AbstractCustomPreset
Definition: AbstractCustomPreset.php:22