Object of a CONTENIDO template configuration

Class to get template configurations for the current article or the current category

Example (article configuration):

$tplCfg = new templateConfig($idart); //get template configuration for current article $exampleAr = $tplCfg->getData(20); //get all informations for container 20 for this template

Example (category configuration): $tplCfg = new templateConfig(); //leave empty cause you only want a category configuration $tplCfg->getDataForIdcat ($idcat); $exampleAr = $tplCfg->getData(20); //get all informations for container 20 for this template

$exampleAr: $exampleAr[0] => ""

"0" specifies the CMS_VALUE set in modules "" contains the configuration data

author Marco Jahn
version 1.0
copyright four for business 2003
package Contenido_API
deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

 Methods

get containers for a specified template configuration returns false if no configuratin was found

_getContainersByTplCfg(integer $idtplcfg) : array
deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

Parameters

$idtplcfg

integer

id of the template

Returns

arrayarray with all containers and their values

get category id by article id

_getIdCatByIdArt(integer $idart) : int

returns false if the specified article doesn't belong to a category

deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

Parameters

$idart

integer

id of the current article

Returns

intreturns the idcat for the current article

get template config id by article id returns false if the article has no configuration

_getTplCfgByArtId(integer $idart) : string

returns the template configuration for the current article if the article has not a template configuration it will return the configuration for the current category

deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

Parameters

$idart

integer

id of the article which configuration should be get

Returns

stringreturns the template configuration

get template config id by category id returns false if the category specified has not a template configuration

_getTplCfgByCatId(integer $idcat) : string
deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

Parameters

$idcat

integer

id of the category which template config should be read out

Returns

stringtemplate configuration for the selected category

get cms_values returns false if no configuration was found

getData(integer $idcontainer) : array
deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

Parameters

$idcontainer

integer

id for the container which settings should be returned

Returns

arrayarray with the settings for each cms_value of the specified container

get data

getDataForIdcat($idcat) 
deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

Parameters

$idcat

get values from template pre configuration returns false if no pre configuration values were found

getPreConfigurationValues(integer $idart, integer $containerid) : array
deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

Parameters

$idart

integer

id of the article

$containerid

integer

id for the container of which the settings should be returned

Returns

arraycontaining pre configuration values

reset data array

resetData() : void
deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

constructor

templateConfig($idart) : void
deprecated 2012-08-24 Use cApiTemplateConfiguration/cApiTemplateConfigurationCollection instead

Parameters

$idart

 Properties

 

$cfg : array
 

$client : int
 

$data : array
 

$db : object
 

$lang : int