‪TYPO3CMS  ‪main
Features.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 
56 {
62  protected array ‪$alwaysActiveFeatures = [
63  // Enabled since v13.0 at any time.
64  'security.usePasswordPolicyForFrontendUsers',
65  'security.backend.enforceContentSecurityPolicy',
66  // Enabled since v12.0 at any time.
67  'subrequestPageErrors',
68  'yamlImportsFollowDeclarationOrder',
69  'security.frontend.htmlSanitizeParseFuncDefault',
70  'runtimeDbQuotingOfTcaConfiguration',
71  // Enabled since v11.0 at any time.
72  'fluidBasedPageModule',
73  // Enabled since v10.0 at any time.
74  'simplifiedControllerActionDispatching',
75  'unifiedPageTranslationHandling',
76  'felogin.extbase',
77  ];
78 
84  public function ‪isFeatureEnabled(string $featureName): bool
85  {
86  if (in_array($featureName, $this->alwaysActiveFeatures, true)) {
87  return true;
88  }
89  return isset(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['features'][$featureName]) && ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['features'][$featureName] === true;
90  }
91 }
‪TYPO3\CMS\Core\Configuration\Features\$alwaysActiveFeatures
‪array $alwaysActiveFeatures
Definition: Features.php:62
‪TYPO3\CMS\Core\Configuration\Features
Definition: Features.php:56
‪TYPO3\CMS\Core\Configuration\Features\isFeatureEnabled
‪isFeatureEnabled(string $featureName)
Definition: Features.php:84
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Configuration
Definition: CKEditor5Migrator.php:18