‪TYPO3CMS  ‪main
DefaultProvider.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 
25 
33 {
34  public function ‪__construct(
35  ‪Typo3Version $typo3Version,
36  ‪Context $context,
37  ‪Features $features,
38  ) {
39  $typo3 = new \stdClass();
40  $typo3->version = $typo3Version->‪getVersion();
41  $typo3->branch = $typo3Version->‪getBranch();
42  $typo3->devIpMask = trim(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'] ?? '');
43  $this->expressionLanguageVariables = [
44  'applicationContext' => (string)‪Environment::getContext(),
45  'typo3' => $typo3,
46  'date' => $context->‪getAspect('date'),
47  'features' => $features,
48  ];
49  $this->expressionLanguageProviders[] = DefaultFunctionsProvider::class;
50  }
51 }
‪TYPO3\CMS\Core\Context\Context\getAspect
‪getAspect(string $name)
Definition: Context.php:76
‪TYPO3\CMS\Core\Information\Typo3Version
Definition: Typo3Version.php:21
‪TYPO3\CMS\Core\ExpressionLanguage\DefaultProvider
Definition: DefaultProvider.php:33
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Core\Information\Typo3Version\getVersion
‪getVersion()
Definition: Typo3Version.php:25
‪TYPO3\CMS\Core\Configuration\Features
Definition: Features.php:56
‪TYPO3\CMS\Core\ExpressionLanguage\FunctionsProvider\DefaultFunctionsProvider
Definition: DefaultFunctionsProvider.php:37
‪TYPO3\CMS\Core\ExpressionLanguage
Definition: AbstractProvider.php:18
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\ExpressionLanguage\DefaultProvider\__construct
‪__construct(Typo3Version $typo3Version, Context $context, Features $features,)
Definition: DefaultProvider.php:34
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Core\Information\Typo3Version\getBranch
‪getBranch()
Definition: Typo3Version.php:30
‪TYPO3\CMS\Core\ExpressionLanguage\AbstractProvider
Definition: AbstractProvider.php:29
‪TYPO3\CMS\Core\Core\Environment\getContext
‪static getContext()
Definition: Environment.php:128