.. include:: /Includes.rst.txt .. index:: ! $GLOBALS Global variables see: Global variables; $GLOBALS .. _globals-variables: ======== $GLOBALS ======== .. seealso:: Most global variables described here can be viewed in module :guilabel:`System > Configuration`: :ref:`globals-exploring` .. confval:: TYPO3_CONF_VARS :name: globals-typo3-conf-vars :Path: $GLOBALS :type: array :Defined: :file:`typo3/sysext/core/Configuration/DefaultConfiguration.php` :Frontend: yes TYPO3 configuration array. Please refer to the chapter :ref:`typo3ConfVars` where each option is described in detail. Most values in this array can be accessed through the tool :guilabel:`System > Settings > Configure Installation-Wide Options`. TCA --- .. confval:: TCA :name: globals-tca :Path: $GLOBALS :type: array :Defined: :php:`\TYPO3\CMS\Core\Core\Bootstrap::loadExtensionTables()` :Frontend: Yes, partly See :ref:`TCA Reference ` T3_SERVICES ----------- .. confval:: T3_SERVICES :name: globals-t3-services :Path: $GLOBALS :type: array :Defined: :php:`\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::initializeGlobalVariables()` :Frontend: Yes Global registration of :ref:`services `. TYPO3_USER_SETTINGS ------------------- .. confval:: TYPO3_USER_SETTINGS :name: globals-typo3-user-settings :Path: $GLOBALS :type: array :Defined: :file:`typo3/sysext/setup/ext_tables.php` .. deprecated:: 14.2 See: `Migration from addFieldsToUserSettings to addUserSetting `_ BE_USER ------- .. confval:: BE_USER :name: globals-be-users :Path: $GLOBALS :type: :php:`\TYPO3\CMS\Core\Authentication\BackendUserAuthentication` :Defined: :php:`\TYPO3\CMS\Core\Core\Bootstrap::initializeBackendUser()` :Frontend: (depends) Backend user object. See :ref:`be-user`. EXEC_TIME --------- .. confval:: EXEC_TIME :name: globals-exec-time :Path: $GLOBALS :type: int :Defined: :php:`\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::initializeGlobalTimeTrackingVariables()` :Frontend: yes Is set to :php:`time()` so that the rest of the script has a common value for the script execution time. .. note:: Should not be used anymore, rather use the :ref:`DateTime Aspect `. SIM_EXEC_TIME ------------- .. confval:: SIM_EXEC_TIME :name: globals-sim-exec-time :Path: $GLOBALS :type: int :Defined: :php:`\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::initializeGlobalTimeTrackingVariables()` :Frontend: yes Is set to :php:`$GLOBALS['EXEC_TIME']` but can be altered later in the script if we want to simulate another execution-time when selecting from e.g. a database (used in the frontend for preview of future and past dates) .. note:: Should not be used anymore, rather use the :ref:`DateTime Aspect `. LANG ---- .. confval:: LANG :name: globals-lang :Path: $GLOBALS :type: :php:`\TYPO3\CMS\Core\Localization\TranslatorInterface` :Defined: is initialized via :php-short:`\TYPO3\CMS\Core\Localization\LanguageServiceFactory` :Frontend: no .. attention:: It is discouraged to use this variable directly. The :php-short:`\TYPO3\CMS\Core\Localization\LanguageServiceFactory` should be used instead to retrieve the translator. The :php-short:`\TYPO3\CMS\Core\Localization\TranslatorInterface` can be used to fetch translations. More information about retrieving the :php-short:`\TYPO3\CMS\Core\Localization\TranslatorInterface` is available in :ref:`extension-localization-php`.