Child pages
  • cRegistry

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The registries heart is the protected method _fetchGlobalVariable() which provides access to global data and allows to define a default value if the requested data does not exist. All other getters are build ontop of this method. A rough overview of the data that can be accessed through the registry:

editisBackendEditModedefault false
langgetLanguageIddefault load_lang
clientgetClientIddefaut default load_client
idartgetArticleIddefault 0
idartlanggetArticleLanguageIddefault 0
idcatgetCategoryIddefault 0
idcatlanggetCategoryLanguageIddefault 0
idcatartgetCategoryArticleIddefault 0
cCurrentModulegetCurrentModuleIddefault 0; This function will work only within module code.
cCurrentContainergetCurrentContainerIddefault 0; This function will work only within module code.
cfggetConfig default array()
cfgClientgetClientConfigdefault array(); can take a parameter $clientId in order to return config of this client


Furthermore the registry is flavoured with some convenience methods to ease the development of modules and plugins.

getLanguageReturns an instance of class cApiLanguage with the ID that is returned by getLanguageId.
getClientReturns an instance of class cApiClient with the ID that is returned by getClientId.
getArticleReturns an instance of class cApiArticle with the ID that is returned by getArticleId.


getArticleLanguageReturns an instance of class cApiArticleLanguage with the ID that is returned by getArticleLanguageId.
getCategoryReturns an instance of class cApiCategory with the ID that is returned by getCategoryId.
getCategoryLanguageReturns an instance of class cApiCategoryLanguage with the ID that is returned by getCategoryLanguageId.
getCategoryArticleReturns an instance of class cApiCategoryArticle with the ID that is returned by getCategoryArticleId.
bootstrapBootstraps the CONTENIDO framework and initializes the global variables sess, auth and perm.
shutdownShutdowns the CONTENIDO framework on page close.
addInfoMessageStores an information massage in the cRegistry.
getInfoMessagesReturns an array with information messages.
addErrorMessageStores an error massage in the cRegistry.
getErrorMessagesReturns an array with error messages.
addWarningMessageStores an warning massage in the cRegistry.
getWarningMessagesReturns an array with warning messages.
isTrackingAllowedwhether tracking is allowed by the DNT header