cron-eu/cron-context
最新稳定版本:3.1.1
Composer 安装命令:
composer require cron-eu/cron-context
包简介
TYPO3_CONTEXT configuration loader
关键字:
README 文档
README
Installation
Install extension via composer and add config/system/additional.php (or use symlinks):
<?php
defined('TYPO3') || die('Access denied.');
require_once \TYPO3\CMS\Core\Core\Environment::getProjectPath() . '/vendor/cron-eu/cron-context/Default.php';
Copy EXT:cron_context/Examples/additional/ to config/system/additional/
Hint: You don't need to install this extension inside TYPO3 CMS.
Configuration
When using EXT:cron_context/Default.php following configuration directories are used (in this order):
EXT:cron_context/Configuration/config/system/additional/
Context examples
TYPO3_CONTEXT=Production (default):
config/system/additional/Production.php
TYPO3_CONTEXT=Testing (eg. for Unit tests):
config/system/additional/Testing.php
TYPO3_CONTEXT=Development (for development):
config/system/additional/Development.php
TYPO3_CONTEXT=Development/Docker (for development inside docker boilerplate):
config/system/additional/Development.phpconfig/system/additional/Development/Docker.php
TYPO3_CONTEXT=Production/Preview (for preview):
config/system/additional/Development.phpconfig/system/additional/Development/Preview.php
TYPO3_CONTEXT=Production/Live/Server4711 (specific live server configuration):
config/system/additional/Development.phpconfig/system/additional/Development/Live.phpconfig/system/additional/Development/Live/Server4711.php
Environment variables
cron_context will read the TYPO3 DB credentials from the following environment variables if present:
- MYSQL_DB or DB_NAME
- MYSQL_HOST or DB_HOST
- MYSQL_PORT or DB_PORT
- MYSQL_USER or DB_USER
- MYSQL_PASS or DB_PASS
- DB_DRIVER (defaults to "mysqli" if not set and a DB_NAME is set)
Advanced usage
If you don't want to use EXT:cron_context/Configuration/ you can customize your own loading in config/system/additional.php
<?php defined('TYPO3') || die('Access denied.'); // Prevent double loading if (defined('CRON_TYPO3_ADDITIONALCONFIGURATION')) { return; } require_once __DIR__ . '/ContextLoader.php'; $confLoader = new \Cron\CronContext\ContextLoader(); $confLoader // Add project context configuration ->addContextConfiguration(\TYPO3\CMS\Core\Core\Environment::getConfigPath() . '/system/additional') // Add local configuration ->addConfiguration(\TYPO3\CMS\Core\Core\Environment::getConfigPath() . '/system/additional/local.php') // Load configuration files (maybe cached) ->loadConfiguration() // Add context name to sitename (if in development context) ->appendContextNameToSitename(); unset($confLoader);
统计信息
- 总下载量: 10.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2021-10-01