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
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

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

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
Author: Stefan Jelner
Located at classes/class.template.php
Methods summary
public
# __construct( array|boolean $tags = false )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Parameters

$tags
array|boolean
$tags [optional]
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
string
$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
string
$which 's' for Static or else dynamic
$needle
string
$needle Placeholder
$replacement
string
$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
string
$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
string
$template Either template string or template file path
$return
boolean
$return [optional] Return or print template
$note
boolean
$note [optional] Echo "Generated by ... " Comment

Returns

string|
Complete template string or nothing

Throws

cInvalidArgumentException
public
# replacei18n( string & $template, string $functionName )

Replaces a named function with the translated variant

Replaces a named function with the translated variant

Parameters

$template
string
$template Contents of the template to translate. It is reference to save memory!!!
$functionName
string
$functionName Name of the translation function (e.g. i18n)
Properties summary
public array $needles array()
#

Needles (static)

Needles (static)

public array $replacements array()
#

Replacements (static)

Replacements (static)

public array $Dyn_needles array()
#

Dyn_Needles (dynamic)

Dyn_Needles (dynamic)

public array $Dyn_replacements array()
#

Dyn_Replacements (dynamic)

Dyn_Replacements (dynamic)

public integer $dyn_cnt 0
#

Dynamic counter

Dynamic counter

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

Tags array (for dynamic blocks);

Tags array (for dynamic blocks);

protected string $_sDomain 'contenido'
#

gettext domain (default: contenido)

gettext domain (default: contenido)

CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0