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

  • cGuiBackendHelpbox
  • cGuiFileOverview
  • cGuiFoldingRow
  • cGuiList
  • cGuiMenu
  • cGuiNavigation
  • cGuiNotification
  • cGuiObjectPager
  • cGuiPage
  • cGuiScrollList
  • cGuiSourceEditor
  • cGuiTableForm
  • cGuiTree
  • cPager
  • cTemplate
  • cTree
  • cTreeItem
  • NoteLink
  • NoteList
  • NoteListItem
  • NoteView
  • TODOBackendList
  • TODOLink
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class cTemplate

class Template Light template mechanism

Package: Core\GUI
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Jan Lengowski, Stefan Jelner
Located at classes/class.template.php
Methods summary
public
# __construct( array|boolean $tags = false )

Constructor function

Constructor function

Parameters

$tags
public
# setDomain( string $sDomain )

Sets the gettext domain to use for translations in a template

Sets the gettext domain to use for translations in a template

Parameters

$sDomain
Sets the domain to use for template translations
public
# set( string $which, string $needle, string $replacement )

Set Templates placeholders and values

Set Templates placeholders and values

With this method you can replace the placeholders in the static templates with dynamic data.

Parameters

$which
's' for Static or else dynamic
$needle
Placeholder
$replacement
Replacement String
public
# setEncoding( string $encoding )

Sets an encoding for the template's head block.

Sets an encoding for the template's head block.

Parameters

$encoding
Encoding to set
public
# next( )

Iterate internal counter by one

Iterate internal counter by one

public
# reset( )

Reset template data

Reset template data

public string|
# generate( string $template, boolean $return = false, boolean $note = false )

Generate the template and print/return it. (do translations sequentially to save memory!!!)

Generate the template and print/return it. (do translations sequentially to save memory!!!)

Parameters

$template
Either template string or template file path
$return
Return or print template
$note
Echo "Generated by ... " Comment

Returns

string|
Complete template string or nothing
public
# replacei18n( string & $template, string $functionName )

Replaces a named function with the translated variant

Replaces a named function with the translated variant

Parameters

$template

Contents of the template to translate (it is reference to save memory!!!)

$functionName
Name of the translation function (e.g. i18n)
Properties summary
public array $needles

Needles (static)

Needles (static)

# array()
public array $replacements

Replacements (static)

Replacements (static)

# array()
public array $Dyn_needles

Dyn_Needles (dynamic)

Dyn_Needles (dynamic)

# array()
public array $Dyn_replacements

Dyn_Replacements (dynamic)

Dyn_Replacements (dynamic)

# array()
public integer $dyn_cnt

Dynamic counter

Dynamic counter

# 0
public array $tags

Tags array (for dynamic blocks);

Tags array (for dynamic blocks);

# array( 'static' => '{%s}', 'start' => '<!-- BEGIN:BLOCK -->', 'end' => '<!-- END:BLOCK -->' )
protected string $_sDomain

gettext domain (default: contenido)

gettext domain (default: contenido)

# 'contenido'
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen