This class contains functions for global interaction in CONTENIDO.
Methods
Stores an information massage in the cRegistry
addErrorMessage(string $message)
Static
Stores an information massage in the cRegistry
addInfoMessage(string $message)
Static
Stores an information massage in the cRegistry
addWarningMessage(string $message)
Static
Bootstraps the CONTENIDO framework and initializes
the global variables sess, auth and perm.
bootstrap($features) : void
Static
Parameters
$features
array array with class name definitions
Getter for an application variable.
getAppVar(string $key, mixed $default) : mixed
Static
Parameters
$key
string
$default
mixed
Default value to return, if the application variable
doesn't exists
Returns
mixed
Returns the loaded cApiArticle object for the current article.
getArticle() : \cApiArticle
Static
Returns the article id stored in the global variable "idart".
getArticleId(boolean $autoDetect) : integer
Static
Parameters
$autoDetect
boolean
If true, the value is tried to detected automatically. (default: false)
Returns
integer
Returns the loaded cApiArticleLanguage object for the current article.
getArticleLanguage() : \cApiArticleLanguage
Static
Returns the article language id stored in the global variable "idartlang".
getArticleLanguageId(boolean $autoDetect) : integer
Static
Parameters
$autoDetect
boolean
If true, the value is tried to detected automatically. (default: false)
Returns
integer
Returns the auth object stored in the global variable "auth".
getAuth() : \cAuth
Static
Returns the CONTENIDO backend language stored in the global variable "belang"
getBackendLanguage() : string
Static
Function wich returns path after the last possible place
changing via configuration file.
getBackendPath() : \path
Static
Returns the CONTENIDO Session ID stored in the global variable "contenido"
getBackendSessionId() : string
Static
Function wich returns the backend URL after the last possible
place changing via configuration file.
getBackendUrl() : \URL
Static
Returns the loaded cApiCategory object for the current category.
getCategory() : \cApiCategory
Static
Returns the loaded cApiCategoryArticle object for the current category/article relation.
getCategoryArticle() : \cApiCategoryArticle
Static
Returns the category/article relation id stored in the global variable "idcatart".
getCategoryArticleId(boolean $autoDetect) : integer
Static
Parameters
$autoDetect
boolean
If true, the value is tried to detected automatically. (default: false)
Returns
integer
Returns the category id stored in the global variable "idcat".
getCategoryId(boolean $autoDetect) : integer
Static
Parameters
$autoDetect
boolean
If true, the value is tried to detected automatically. (default: false)
Returns
integer
Returns the loaded cApiCategoryLanguage object for the current category.
getCategoryLanguage() : \cApiCategoryLanguage
Static
Returns the category language id stored in the global variable "idcatlang".
getCategoryLanguageId(boolean $autoDetect) : integer
Static
Parameters
$autoDetect
boolean
If true, the value is tried to detected automatically. (default: false)
Returns
integer
Return the global CONTENIDO Execution Chain Registry.
getCecRegistry() : \cApiCecRegistry
Static
Returns the loaded cApiClient object for the current client.
getClient() : \cApiClient
Static
Returns the client configuration array stored in the global variable "cfgClient".
getClientConfig(integer $clientId) : array
Static
If no client ID is specified or is 0 the complete array is returned.
Parameters
$clientId
integer
Client ID (optional)
Returns
array
Returns the current client ID stored in the global variable "client".
getClientId() : integer
Static
Returns the configuration array stored in the global variable "cfg".
getConfig() : array
Static
Returns the current container ID.
getCurrentContainerId() : integer
Static
Note: This function will work only within module code.
Returns
integer
Returns the current module ID.
getCurrentModuleId() : integer
Static
Note: This function will work only within module code.
Returns
integer
Returns a new CONTENIDO database object.
getDb() : \cDb
Static
TODO |
: Perhaps its better to instantiate only one object and reset it on call. |
Returns
Fetches the database table name with its prefix.
getDbTableName(string $index) : string
Static
Parameters
$index
string
name of the index
Returns
string
Returns an array with error messages
getErrorMessages() : array
Static
Function wich returns path after the last possible place
changing via configuration file.
getFrontendPath() : \path
Static
The path point to the current client
Returns
\path
Function wich returns URL after the last possible place
changing via configuration file.
getFrontendUrl() : \URL
Static
The path point to the current client
Returns
\URL
Returns an array with information messages
getInfoMessages() : array
Static
Returns the loaded cApiLanguage object for the current language.
getLanguage() : \cApiLanguage
Static
Returns the current language ID stored in the global variable "lang".
getLanguageId() : integer
Static
Returns the permission object stored in the global variable "perm".
getPerm() : \cPermission
Static
Return the session object stored in the global variable "sess".
getSession() : \cSession
Static
Returns an array with warning messages
getWarningMessages() : array
Static
Checks if the edit mode in backend is active or not stored in the global variable "edit"
isBackendEditMode() : boolean
Static
Setter for an application variable.
setAppVar(string $key, mixed $value)
Static
Parameters
$key
string
$value
mixed
Shutdowns the CONTENIDO framework on page close.
shutdown() : void
Static
Unsets an existing application variable.
unsetAppVar(string $key)
Static
Fetches the global variable requested.
_fetchGlobalVariable(string $variableName, mixed $defaultValue) : mixed
Static
If variable is not set, the default value is returned.
Parameters
$variableName
string
name of the global variable
$defaultValue
mixed
default value
Returns
mixed
Fetches the corresponding Item object for the specific class name and its
primary key value.
_fetchItemObject(string $apiClassName, integer $objectId) : \Item
Static
Parameters
$apiClassName
string
name of the api class
$objectId
integer
primary key value
Exceptions
Returns
Properties
$_appVars : array
Meant to set and get application wide
variables as an alternative to store them in global scope.