webdevops / context-loader
Context configuration loader for TYPO3 (TYPO3_CONTEXT)
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 6
Open Issues: 1
Type:typo3-cms-extension
Requires
- php: >=5.3.0
- typo3/cms-core: >=6.2.0,<8.0
Replaces
- context-loader: 1.0.0
- typo3-ter/context-loader: 1.0.0
This package is not auto-updated.
Last update: 2022-08-07 17:18:38 UTC
README
Installation
Install this extension via composer
or TYPO3-TER and add following snippet to your typo3conf/AdditionalConfiguration.php
:
<?php
defined('TYPO3_MODE') || exit('Access denied.');
require_once __DIR__ . '/ext/context_loader/ContextInit.php';
As example configuration copy EXT:context_loader/Examples/
to typo3conf/AdditionalConfiguration/
Configuration
Context examples
TYPO3_CONTEXT=Production (default):
typo3conf/AdditionalConfiguration/Production.php
typo3conf/AdditionalConfiguration/Local.php
TYPO3_CONTEXT=Testing (eg. for Unit tests):
typo3conf/AdditionalConfiguration/Testing.php
typo3conf/AdditionalConfiguration/Local.php
TYPO3_CONTEXT=Development (for development):
typo3conf/AdditionalConfiguration/Development.php
typo3conf/AdditionalConfiguration/Local.php
TYPO3_CONTEXT=Development/Docker (for development inside TYPO3 docker boilerplate):
typo3conf/AdditionalConfiguration/Development.php
typo3conf/AdditionalConfiguration/Development/Docker.php
typo3conf/AdditionalConfiguration/Local.php
TYPO3_CONTEXT=Production/Preview (for preview):
typo3conf/AdditionalConfiguration/Development.php
typo3conf/AdditionalConfiguration/Development/Preview.php
typo3conf/AdditionalConfiguration/Local.php
TYPO3_CONTEXT=Production/Live/Server4711 (specific live server configuration):
typo3conf/AdditionalConfiguration/Development.php
typo3conf/AdditionalConfiguration/Development/Live.php
typo3conf/AdditionalConfiguration/Development/Live/Server123.php
typo3conf/AdditionalConfiguration/Local.php
Extension configuration
You can also manipulate extension configuration in Context files:
<?php
\WebDevOps\ContextLoader\ContextLoader::getInstance()
->setExtensionConfiguration('metaseo', 'fookey', 'barvalue');
->setExtensionConfigurationList('metaseo', [
'fookey1' => 'barval1',
'fookey2' => 'barval2',
]);