Methods

Construct of the class

__construct($layoutId, $layoutCode, $cfg, $lang, $db) 

Parameters

$layoutId

$layoutCode

$cfg

$lang

$db

Removes this layout from the filesystem.

eraseLayout() : boolean

Also deletes the version files.

Returns

booleantrue on success or false on failure

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

existLayout(string $layoutAlias, $cfgClient, $client) : \boolen
Static

Parameters

$layoutAlias

string

$cfgClient

$client

Returns

\boolenif file exist true

Get the contents of the file

getLayoutCode() : \content

Returns

\contentor false

Get the layout name

getLayoutName() : string

Returns

stringlayoutname

Init all vars for the class

init(int $layoutId, $layoutCode, array $cfg, $lang) 

Parameters

$layoutId

int

$layoutCode

$cfg

array

$lang

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

initWithDbObject(\cDb $dbObject) 

Parameters

$dbObject

\cDb

Can write/create a file

isWritable(string $fileName, string $directory) : \boolean,

Parameters

$fileName

string

file name

$directory

string

directory where is the file

Returns

\boolean,success true else false

Rename the Layout directory and layout file

rename(string $old, string $new) 

Parameters

$old

string

$new

string

Save Layout

saveLayout(string $layoutCode) : boolean

Parameters

$layoutCode

string

Returns

booleantrue

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

saveLayoutByUpgrade(string $layoutCode) 

Parameters

$layoutCode

string

Save all layout in file system.

upgrade() : void

Use it for upgrade.

Exceptions

\cException if the layout could not be saved

Make all directories for layout.

_makeDirectories() : boolean

Main directory and Layout directory

Returns

booleantrue if successfully

Make directory

_makeDirectory(string $directory) : boolean

Parameters

$directory

string

Returns

booleantrue if succssesfully

_rec_rmdir()

_rec_rmdir($path) 
deprecated 2012-09-10 Use cFileHandler::recursiveRmdir($dirname) instead

Parameters

$path

_save()

_save($layoutCode) 

Parameters

$layoutCode

Save encoding from language.

_setEncoding(int $lang) 

Parameters

$lang

int

 Properties

 

$_cfg : array
 

$_db 
 

$_encoding : string
 

$_fileName : string
 

$_layoutCode : string
 

$_layoutId : int
 

$_layoutMainPath : string

[layout_path].layouts

 

$_layoutName : string
 

$_layoutPath : string