Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • 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
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

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

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
$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
$idart
$lang
$client
$layout
$save
Flag to persist generated code
$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
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
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
Assoziative list of CMS variables
$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 $containerNumber, 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

$containerNumber
Container number
$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 $containerNumber, 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

$containerNumber
Container number (The id attribute in container tag)
$module

Recordset as assoziative array of related module (container code)

protected
# _processCmsContainer( integer $containerNumber )

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

$containerNumber
Container number (The id attribute in container tag)
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
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
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

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

# array()
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

Module output code prefix

Module output code prefix

# array()
protected string $_moduleCode

Module output code

Module output code

# ''
protected array $_moduleSuffix

Module output code suffix

Module output code suffix

# array()
protected cApiArticleLanguage $_oArtLang

Module output code suffix

Module output code suffix

#
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen