Core API

3.5.2. Global variables

Notice: Variables in italics may be set in a script prior to inclusion of "init.php" so they are optional.

Notice: The variables from "t3lib/stddb/tables.php" are only available in the frontend occasionally or partly. Please read more in the documentation of the "cms" extension on this issue.

Global variable

Defined in

Description

Avail. in FE

$TYPO3_CONF_VARS

config_default.php

TYPO3 configuration array. Please refer to the source code of "t3lib/config_default.php" where each option is described in detail as comments. The same comments are also available in the Install Tool under the menu "All Configuration"

YES

$TYPO3_LOADED_EXT

config_default.php

Array with all loaded extensions listed with a set of paths.  You can check if an extension is loaded by the function t3lib_extMgm::isLoaded($key) where $key is the extension key of the module.

YES

$TYPO3_DB

init.php

An instance of the TYPO3 DB wrapper class, t3lib_db.

You have to use this object for all interaction with the database.

t3lib_db contains mysql wrapper functions so you easily swap all hardcoded MySQL calls with function calls to $GLOBALS['TYPO3_DB']->

YES

$EXEC_TIME

config_default.php

Is set to "time()" so that the rest of the script has a common value for the script execution time.

YES

$SIM_EXEC_TIME

config_default.php

Is set to $EXEC_TIME but can be altered later in the script if we want to simulate another execution-time when selecting from eg. a database  (used in the frontend for preview of future and past dates)

YES

$TYPO_VERSION

config_default.php

Deprecated - used constant "TYPO3_version" instead!

YES

$CLIENT

init.php

Array with browser information (based on HTTP_USER_AGENT). Array keys:

"BROWSER" = msie,net,opera or blank,

"VERSION" = browser version as double,

"SYSTEM" = win,mac,unix

YES

$PARSETIME_START

init.php

Time in milliseconds right after inclusion of the configuration.

-

$PAGES_TYPES

t3lib/stddb/tables.php

See section on $TCA

(occastionally)

$ICON_TYPES

t3lib/stddb/tables.php

See section on $TCA

(occastionally)

$LANG_GENERAL_LABELS

t3lib/stddb/tables.php

See section on $TCA

(occastionally)

$TCA

t3lib/stddb/tables.php

See section on $TCA

YES, partly

$TBE_MODULES

t3lib/stddb/tables.php

The backend main/sub module structure. See section elsewhere plus sourcecode of "class.t3lib_loadmodules.php" which also includes some examples.

(occastionally)

$TBE_STYLES

t3lib/stddb/tables.php

 

(occastionally)

$T3_SERVICES

t3lib/stddb/tables.php

Global registration of services.

 

$T3_VAR

config_default.php

Space for various internal global data storage in TYPO3. Each key in this array is a data space for an application. Keys currently defined for use is:

 

['callUserFunction'] + ['callUserFunction_classPool']: Used by t3lib_div::callUserFunction to store persistent objects.

['getUserObj'] : User by t3lib_div::getUserObj to store persistent objects.

['RTEobj'] : Used to hold the current RTE object if any. See t3lib_BEfunc.

['ext'][extension-key] : Free space for extensions.

 

$FILEICONS

t3lib/stddb/tables.php

Assoc. array; keys are the type (eg. "tif") and values are the filename (without path)

(occastionally)

$WEBMOUNTS

init.php

Array of uid's to be mounted in the page-tree

(depends)

$FILEMOUNTS

init.php

Array of filepaths on the server to be mountet in the directory tree

(depends)

$BE_USER

init.php

Backend user object

(depends)

$temp_*

-

Various temporary variables are allowed to use global variables prefixed $temp_

-

$typo_db*

[config_default.php but N/A!]

Variables used inside of "typo3conf/localconf.php" to configure the database.

Notice: These values are unset again by "config_default.php".

-

$TBE_MODULES_EXT

[In ext_tables.php files of extensions]

Used to store information about modules from extensions that should be included in "function menus" of real modules. See the Extension API for details.

Unset in "config_default.php"

(occasionally)

$TCA_DESCR

[tables.php files]

Can be set to contain file references to local lang files containing TCA_DESCR labels. See section about Context Sensitive Help.

Unset in "config_default.php"

 

 

To top


Valid XHTML 1.0!