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

  • cLayoutHandler
  • cLayoutSynchronizer
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class cLayoutHandler

This class controls all layouts in filesystem.

Package: Core\LayoutHandler
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Rusmir Jusufovic
Located at classes/class.layout.handler.php
Methods summary
public
# __construct( integer $layoutId = 0, string $layoutCode = "", array $cfg = array(), integer $lang = 0, cDb $db = NULL )

Construct of the class

Construct of the class

Parameters

$layoutId
$layoutCode
$cfg
$lang
$db
public string
# _getLayoutPath( )

Get method for Layout path

Get method for Layout path

Returns

string
public string
# _getFileName( )

Get method for Filename

Get method for Filename

Returns

string
public static boolean
# existLayout( string $layoutAlias, array $cfgClient, integer $client )

Look in layout directory if layout [$layoutAlias] directory exists

Look in layout directory if layout [$layoutAlias] directory exists

Parameters

$layoutAlias
$cfgClient
$client

Returns

boolean
true if file exist
public
# init( integer $layoutId, string $layoutCode, array $cfg, integer $language )

Init all vars for the class

Init all vars for the class

Parameters

$layoutId
$layoutCode
$cfg
$language
public string
# getLayoutName( )

Get the layout name

Get the layout name

Returns

string
layoutname
public
# initWithDbObject( cDb $dbObject )

Init class vars with values, only use for setup or upgrade

Init class vars with values, only use for setup or upgrade

Parameters

$dbObject
private boolean
# _makeDirectories( )

Make all directories for layout. Main directory and Layout directory

Make all directories for layout. Main directory and Layout directory

Returns

boolean
true if successfully
private boolean
# _makeDirectory( string $directory )

Make directory

Make directory

Parameters

$directory

Returns

boolean
true if succssesfully
private
# _setEncoding( integer $lang )

Save encoding from language.

Save encoding from language.

Parameters

$lang
public boolean
# isWritable( string $fileName, string $directory )

Can write/create a file

Can write/create a file

Parameters

$fileName
file name
$directory
directory where is the file

Returns

boolean
true on success else false
public boolean
# saveLayout( string $layoutCode = '' )

Save Layout

Save Layout

Parameters

$layoutCode

Returns

boolean
true
public boolean
# saveLayoutByUpgrade( string $layoutCode = '' )

Save the layout only if layout doesn't exist in filesystem! Use it for upgrade!

Save the layout only if layout doesn't exist in filesystem! Use it for upgrade!

Parameters

$layoutCode

Returns

boolean
private boolean
# _save( string $layoutCode = '' )

Parameters

$layoutCode

Returns

boolean
public boolean
# eraseLayout( )

Removes this layout from the filesystem. Also deletes the version files.

Removes this layout from the filesystem. Also deletes the version files.

Returns

boolean
true on success or false on failure
public boolean
# rename( string $old, string $new )

Rename the Layout directory and layout file

Rename the Layout directory and layout file

Parameters

$old
$new

Returns

boolean
public string|boolean
# getLayoutCode( )

Get the contents of the file

Get the contents of the file

Returns

string|boolean
content or false
public static
# upgrade( cDb $adb, array $cfg, integer $clientId )

Save all layout in file system. Use it for upgrade.

Save all layout in file system. Use it for upgrade.

Parameters

$adb
database object
$cfg
CONTENIDO config array
$clientId

Throws

cException
if the layout could not be saved
Properties summary
protected integer $_layoutId

The ID of the layout

The ID of the layout

# 0
protected string $_layoutCode

The code of the layout

The code of the layout

# ""
protected cDb $_db
# NULL
protected string $_layoutName

Layout name

Layout name

# ""
protected array $_cfg

The contenido cfg

The contenido cfg

# array()
protected string $_encoding

Encoding of the page

Encoding of the page

#
protected string $_layoutPath

Layout path [layout_path].layoutName/

Layout path [layout_path].layoutName/

# ""
protected string $_layoutMainPath

Main path of layouts. [layout_path].layouts

Main path of layouts. [layout_path].layouts

# ""
protected string $_fileName

File name of the layout ([layoutname].html

File name of the layout ([layoutname].html

# ""
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen