Documentation

Layout
in package

Layout class.

Table of Contents

checkTemplatePath()  : bool
Check if template exists.
getActiveLayout()  : string
Get active layout name.
getAllLayouts()  : array<string|int, string>
Get all layouts list.
getImagePath()  : array<string|int, mixed>
The function get path to the image.
getLayoutFile()  : string
Get file from layout.
getLayoutPaths()  : array<string|int, mixed>
Gets layout paths.
getPublicUrl()  : string
Get public url from file.
getTemplatePath()  : string
Function takes a template path.
getUniqueId()  : string
Get unique id for HTML ids.
truncateHtml()  : string
Truncating HTML and adding a button showing all the text.
truncateText()  : string
Truncating plain text and adding a button showing all the text.

Methods

checkTemplatePath()

Check if template exists.

public static checkTemplatePath(string $templateName[, string $moduleName = '' ]) : bool
Parameters
$templateName : string
$moduleName : string = ''
Return values
bool

getActiveLayout()

Get active layout name.

public static getActiveLayout() : string
Return values
string

getAllLayouts()

Get all layouts list.

public static getAllLayouts() : array<string|int, string>
Return values
array<string|int, string>

getImagePath()

The function get path to the image.

public static getImagePath(string $imageName) : array<string|int, mixed>
Parameters
$imageName : string
Return values
array<string|int, mixed>

getLayoutFile()

Get file from layout.

public static getLayoutFile(string $name) : string
Parameters
$name : string
Return values
string

getLayoutPaths()

Gets layout paths.

public static getLayoutPaths() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPublicUrl()

Get public url from file.

public static getPublicUrl(string $name[, bool $full = false ]) : string
Parameters
$name : string
$full : bool = false
Return values
string

getTemplatePath()

Function takes a template path.

public static getTemplatePath(string $templateName[, string $moduleName = '' ]) : string
Parameters
$templateName : string
$moduleName : string = ''
Return values
string

getUniqueId()

Get unique id for HTML ids.

public static getUniqueId([string $name = '' ]) : string
Parameters
$name : string = ''
Return values
string

truncateHtml()

Truncating HTML and adding a button showing all the text.

public static truncateHtml(string $html[, string $size = 'medium' ][, int $length = 200 ][, mixed $showBtn = false ]) : string
Parameters
$html : string
$size : string = 'medium'
$length : int = 200
$showBtn : mixed = false
Return values
string

truncateText()

Truncating plain text and adding a button showing all the text.

public static truncateText(string $text, int $length[, bool $showIcon = false ][, bool $nl2br = false ]) : string
Parameters
$text : string
$length : int
$showIcon : bool = false
$nl2br : bool = false
Return values
string

        

Search results