This class contains functions for global interaction in CONTENIDO.

 Methods

Stores an information massage in the cRegistry

addErrorMessage(string $message) 
Static

Parameters

$message

string

message

Stores an information massage in the cRegistry

addInfoMessage(string $message) 
Static

Parameters

$message

string

message

Stores an information massage in the cRegistry

addWarningMessage(string $message) 
Static

Parameters

$message

string

message

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

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

Returns the CONTENIDO backend language stored in the global variable "belang"

getBackendLanguage() : string
Static

Returns

string

Function wich returns path after the last possible place changing via configuration file.

getBackendPath() : \path
Static

Returns

\path

Returns the CONTENIDO Session ID stored in the global variable "contenido"

getBackendSessionId() : string
Static

Returns

string

Function wich returns the backend URL after the last possible place changing via configuration file.

getBackendUrl() : \URL
Static

Returns

\URL

Returns the loaded cApiCategory object for the current category.

getCategory() : \cApiCategory
Static

Returns

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

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

integer

Returns the configuration array stored in the global variable "cfg".

getConfig() : array
Static

Returns

array

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

Returns

array

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

array

Returns the loaded cApiLanguage object for the current language.

getLanguage() : \cApiLanguage
Static

Returns

Returns the current language ID stored in the global variable "lang".

getLanguageId() : integer
Static

Returns

integer

Returns the permission object stored in the global variable "perm".

getPerm() : \cPermission
Static

Returns

Return the session object stored in the global variable "sess".

getSession() : \cSession
Static

Returns

Returns an array with warning messages

getWarningMessages() : array
Static

Returns

array

Checks if the edit mode in backend is active or not stored in the global variable "edit"

isBackendEditMode() : boolean
Static

Returns

boolean

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

Parameters

$key

string

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

\cInvalidArgumentException if the given objectId is not greater than 0 or the given class does not exist

Returns

 Properties

 

$_errMessages : array
 

$_infoMessages : array
 

$_warnMessages : array
 

$_appVars : array

Meant to set and get application wide variables as an alternative to store them in global scope.