Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cCodeGeneratorAbstract
  • cCodeGeneratorFactory
  • cCodeGeneratorStandard
  • cContentTypeAbstract
  • cContentTypeAbstractTabbed
  • cContentTypeDate
  • cContentTypeFilelist
  • cContentTypeHead
  • cContentTypeHtml
  • cContentTypeHtmlhead
  • cContentTypeImg
  • cContentTypeImgdescr
  • cContentTypeImgeditor
  • cContentTypeLink
  • cContentTypeLinkdescr
  • cContentTypeLinkeditor
  • cContentTypeLinktarget
  • cContentTypeTeaser
  • cContentTypeText
  • cTypeGenerator
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cCodeGeneratorAbstract

CONTENIDO abstract code generator class.

Direct known subclasses

cCodeGeneratorStandard
Abstract
Package: Core\ContentType
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc <murat@purc.de>
Located at classes/code_generator/class.code.generator.abstract.php
Methods summary
public
# __construct( )
public
# setFrontendDebugOptions( array $debugOptions )

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

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

Parameters

$debugOptions
boolean
$debug
public string
# generate( integer $idcat, integer $idart, integer $lang, integer $client, boolean $layout = false, boolean $save = true, boolean $contype = true )

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

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

Parameters

$idcat
integer
$idcat
$idart
integer
$idart
$lang
integer
$lang
$client
integer
$client
$layout
boolean
$layout
$save
boolean
$save Flag to persist generated code
$contype
boolean
$contype Flag to enable/disable replacement of CMS_TAGS[]

Returns

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

Throws

cInvalidArgumentException
if an article with the given idart and idlang can not be loaded
abstract public string
# _generate( boolean $contype = true )

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

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

Parameters

$contype
boolean
$contype Flag to enable/disable replacement of CMS_TAGS[]

Returns

string
The generated code
protected integer|null
# _getTemplateConfigurationId( )

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

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

Returns

integer|null
abstract protected
# _processNoConfigurationError( integer $idcatart )

Parameters

$idcatart
integer
$idcatart
protected array
# _getTemplateData( )

Returns array containing used layout, template and template name

Returns array containing used layout, template and template name

Returns

array
Asooziative array like array('idlay' => (int), 'idtpl' => (int), 'name' => (string))
protected
# _processCmsTags( array $contentList, boolean $saveKeywords = true )

Processes replacements of all existing CMS_... tags within passed code

Processes replacements of all existing CMS_... tags within passed code

Parameters

$contentList
array
$contentList Assoziative list of CMS variables
$saveKeywords
boolean
$saveKeywords Flag to save collected keywords during replacement process.
abstract protected
# _processCodeTitleTag( )

Processes title tag in page code (layout)

Processes title tag in page code (layout)

abstract protected
# _processCodeMetaTags( )

Processes all meta tags in page code (layout)

Processes all meta tags in page code (layout)

protected string
# _processCmsValueTags( integer $containerId, string $containerCfg )

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

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

Parameters

$containerId
integer
$containerId Container id
$containerCfg
string
$containerCfg A string being formatted like concatenated query parameter, e. g. param1=value1&param2=value2...

Returns

string
Concatenated PHP code containing CMS_VALUE variables and their values
protected
# _processFrontendDebug( integer $containerId, array $module )

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

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

Parameters

$containerId
integer
$containerId Container id
$module
array
$module Recordset as assoziative array of related module (container code)
protected
# _processCmsContainer( integer $containerId )

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

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

Parameters

$containerId
integer
$containerId Container id
protected array
# _getUsedCmsTypesData( )

Returns array of all CMS_... vars being used by current article and language

Returns array of all CMS_... vars being used by current article and language

Returns

array
like $arr[type][typeid] = value;
protected
# _resetModule( )

Resets module related variables

Resets module related variables

protected string
# _getContentTypeClassName( string $type )

Returns the classname for a content type.

Returns the classname for a content type.

Parameters

$type
string
$type Content type, e. g. CMS_HTMLHEAD

Returns

string
The classname e. g. cContentTypeHtmlhead for content type CMS_HTMLHEAD
protected string
# _getContentTypeCodeFilePathName( string $type )

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

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

Parameters

$type
string
$type Content type, e. g. CMS_HTMLHEAD

Returns

string
The full path e. g. {path_to_contenido_includes}/type/code/include.CMS_HTMLHEAD.code.php for content type CMS_HTMLHEAD
protected cApiArticleLanguage
# getArtLangObject( )

Returns

cApiArticleLanguage
the artlang object
Properties summary
protected cDb $_db
#

CONTENIDO database instance

CONTENIDO database instance

protected array $_feDebugOptions array()
#

Frontend debug options, see $frontend_debug in __FRONTEND_PATH__/data/config/config.php

Frontend debug options, see $frontend_debug in __FRONTEND_PATH__/data/config/config.php

protected string $_cssData ''
#

Collected CSS data for current template

Collected CSS data for current template

protected string $_jsData ''
#

Collected JS data for current template

Collected JS data for current template

protected string $_tplName ''
#

Template name

Template name

protected integer $_idcat
#

Category id

Category id

protected integer $_idart
#

Article id

Article id

protected integer $_lang
#

Language id

Language id

protected integer $_client
#

Client id

Client id

protected boolean $_layout
#

Flag to process layout

Flag to process layout

protected boolean $_save
#

Flag to persist generated code

Flag to persist generated code

protected integer $_idartlang
#

Article language id

Article language id

protected string $_pageTitle
#

Page title (generally from article language table)

Page title (generally from article language table)

protected string $_layoutCode ''
#

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

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

protected array $_modulePrefix array()
#

Module output code prefix

Module output code prefix

protected string $_moduleCode ''
#

Module output code

Module output code

protected array $_moduleSuffix array()
#

Module output code suffix

Module output code suffix

protected cApiArticleLanguage $oArtLang
#

Module output code suffix

Module output code suffix

CMS CONTENIDO 4.9.1 API documentation generated by ApiGen 2.8.0