CONTENIDO abstract code generator class.

package Core
subpackage Content Type

 Methods

__construct()

__construct() 

Generates the code for a specific article (article for a client in a language).

_generate($contype) : string

Parameters

$contype

Returns

stringThe generated code

Generates the code for a specific article (article for a client in a language).

generate(int $idcat, int $idart, int $lang, int $client, bool $layout, bool $save, $contype) : string

Parameters

$idcat

int

$idart

int

$lang

int

$client

int

$layout

bool

$save

bool

Flag to persist generated code

$contype

Exceptions

\cInvalidArgumentException if an article with the given idart and idlang can not be loaded

Returns

stringGenerated code or error code '0601' if no template configuration was found for category or article.

Setter for debug property

setDebug(bool $debug) 
deprecated No longer needed. The backend chooses the debug mode.

Parameters

$debug

bool

Setter for frontend debug options (see $frontend_debug in __FRONTEND_PATH__/data/config/config.php located in clients frontend directory)

setFrontendDebugOptions(array $debugOptions) 

Parameters

$debugOptions

Outputs passed message, if debug is enabled

_debug(string $msg) 
deprecated 2012-08-13 Use cDebug instead!

Parameters

$msg

string

Returns the classname for a content type.

_getContentTypeClassName(string $type) : string

Parameters

$type

string

Content type, e. g. CMS_HTMLHEAD

Returns

stringThe classname e. g. cContentTypeHtmlhead for content type CMS_HTMLHEAD

Returns the full path to the include file name of a content type.

_getContentTypeCodeFilePathName(string $type) : string

Parameters

$type

string

Content type, e. g. CMS_HTMLHEAD

Returns

stringThe full path e. g. {path_to_contenido_includes}/type/code/include.CMS_HTMLHEAD.code.php for content type CMS_HTMLHEAD

Returns the template configuration id, either by configured article or by configured category.

_getTemplateConfigurationId() : int

Returns

intnull

Returns array containing used layout, template and template name

_getTemplateData() : array
global array $cfg

Returns

arrayAsooziative array like array('idlay' => (int), 'idtpl' => (int), 'name' => (string))

Returns array of all CMS_.

_getUsedCmsTypesData() : array

.. vars being used by current article and language

Returns

arraylike $arr[type][typeid] = value;

Replaces container tag in layout against the parsed container code (module code).

_processCmsContainer(int $containerId) 

Parameters

$containerId

int

Container id

Processes replacements of all existing CMS_.

_processCmsTags(array $contentList, bool $saveKeywords) 

.. tags within passed code

Parameters

$contentList

array

Assoziative list of CMS variables

$saveKeywords

bool

Flag to save collected keywords during replacement process.

Replaces all container/module configuration tags (CMS_VALUE[n] values) against their settings.

_processCmsValueTags(int $containerId, string $containerCfg) : string

Parameters

$containerId

int

Container id

$containerCfg

string

A string being formatted like concatenated query parameter, e. g. param1=value1¶m2=value2...

Returns

stringConcatenated PHP code containing CMS_VALUE variables and their values

Processes all meta tags in page code (layout)

_processCodeMetaTags() 

Processes title tag in page code (layout)

_processCodeTitleTag() 

Extends container code by adding several debug features, if enabled and configured.

_processFrontendDebug(int $containerId, array $module) 

Parameters

$containerId

int

Container id

$module

array

Recordset as assoziative array of related module (container code)

_processNoConfigurationError()

_processNoConfigurationError() 

Resets module related variables

_resetModule() 

returns the artlang object

getArtLangObject() 

 Properties

 

$_client : int
 

$_cssData : string
 

$_db : \cDb
 

$_debug : bool
deprecated No longer needed. The backend chooses the debug mode.
 

$_feDebugOptions : array
 

$_idart : int
 

$_idartlang : int
 

$_idcat : int
 

$_jsData : string
 

$_lang : int
 

$_layout : bool
 

$_layoutCode : string

Initially with container tags which will be replaced against module outputs.

 

$_moduleCode : string
 

$_modulePrefix : array
 

$_moduleSuffix : array
 

$_pageTitle : string
 

$_save : bool
 

$_tplName : string
 

$oArtLang : array