Project

General

Profile

Actions

Feature #39441

closed

Add TYPO3 Context information

Added by Fabien Udriot almost 12 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-08-01
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
hard
Sprint Focus:

Description

What is your opinion about introducing a TYPO3 Context?

This would imply:

  • Add a TYPO3_CONTEXT constant
  • The constant could be set by either simply setting the constant or by a PHP Environment variable or by PHP configuration.

# Computes Context
if (!defined('TYPO3_CONTEXT')) {
    if (getenv('TYPO3_CONTEXT')) {
        define('TYPO3_CONTEXT', getenv('TYPO3_CONTEXT'));
    } elseif (ini_get('TYPO3_ENV')) {
        define('TYPO3_CONTEXT', ini_get('TYPO3_CONTEXT'));
    } else {
        define('TYPO3_CONTEXT', 'Production');
    }
}
  • TYPO3 would automatically load FooConfiguration.php if Foo is the Context name
  • Add a new TypoScript condition for convenience
  [context = Foo]
  [end]
  • Display a possible message in the BE Header of the current Context (should be only displayed if the Context is not production).
  • The Core could possibly ship some default presets for particular context (e.g. Development)

The default Context would be "Production" to stay backwards compatible.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Feature #49988: Backport ApplicationContext from FlowClosed2013-07-17

Actions
Related to TYPO3 Core - Feature #50131: Load context specific configuration filesClosed2013-07-17

Actions
Related to TYPO3 Core - Feature #50132: TypoScript: Application Context conditionClosed2013-07-17

Actions
Actions

Also available in: Atom PDF