‪TYPO3CMS  10.4
TypoScriptConditionProvider.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 
31 {
32  public function ‪__construct()
33  {
34  $typo3 = new \stdClass();
35  $typo3Version = GeneralUtility::makeInstance(Typo3Version::class);
36  $typo3->version = $typo3Version->getVersion();
37  $typo3->branch = $typo3Version->getBranch();
38  $typo3->devIpMask = trim(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']);
39  $this->expressionLanguageVariables = [
40  'request' => GeneralUtility::makeInstance(RequestWrapper::class, ‪$GLOBALS['TYPO3_REQUEST'] ?? null),
41  'applicationContext' => (string)‪Environment::getContext(),
42  'typo3' => $typo3,
43  ];
44  $this->expressionLanguageProviders = [
45  Typo3ConditionFunctionsProvider::class
46  ];
47  }
48 }
‪TYPO3\CMS\Core\Information\Typo3Version
Definition: Typo3Version.php:21
‪TYPO3\CMS\Core\Core\Environment\getContext
‪static ApplicationContext getContext()
Definition: Environment.php:133
‪TYPO3\CMS\Core\ExpressionLanguage\TypoScriptConditionProvider\__construct
‪__construct()
Definition: TypoScriptConditionProvider.php:32
‪TYPO3\CMS\Core\ExpressionLanguage
Definition: AbstractProvider.php:18
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:40
‪TYPO3\CMS\Core\ExpressionLanguage\FunctionsProvider\Typo3ConditionFunctionsProvider
Definition: Typo3ConditionFunctionsProvider.php:34
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\ExpressionLanguage\AbstractProvider
Definition: AbstractProvider.php:24
‪TYPO3\CMS\Core\ExpressionLanguage\TypoScriptConditionProvider
Definition: TypoScriptConditionProvider.php:31