PHP Класс Webiny\Component\Bootstrap\ApplicationClasses\View

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
appendScript ( string $path, string $type = 'text/javascript' ) Append a script to the script array.
appendStyleSheet ( string $path ) Appends a stylesheet to the stylesheet array.
assign ( array $data, string $root = 'Ctrl' ) Assign variables to the view.
getAssignedData ( ) : array Get a list of assigned view data.
getAutoload ( ) : boolean Get the state of view template auto load.
getMeta ( ) : array Get the meta list.
getMetaHtml ( ) : string Get the meta list as html tags.
getScripts ( ) : array Get the script list.
getScriptsHtml ( ) : string Get the script list as html tags.
getStyleSheets ( ) : array Get the stylesheet list.
getStyleSheetsHtml ( ) : string Get the stylesheet list as html tags.
getTemplate ( ) : string Get the assigned view template.
getTitle ( ) : string Get the current page title.
getTitleHtml ( ) : string Get the current page title as html tag.
prependScript ( string $path, string $type = 'text/javascript' ) Prepends a script to the script array.
prependStyleSheet ( string $path ) Prepends a stylesheet to the stylesheet array.
setAutoload ( boolean $autoload ) Set the view template auto load.
setMeta ( string $name, string $content ) Set a html meta tag.
setTemplate ( string $template ) Set the view template file.
setTitle ( string $title ) Set the page title.

Описание методов

appendScript() публичный Метод

Append a script to the script array.
public appendScript ( string $path, string $type = 'text/javascript' )
$path string Path to the script. It can be relative path to the Public/static folder or a full http path.
$type string Script type, default is 'text/javascript'.

appendStyleSheet() публичный Метод

Appends a stylesheet to the stylesheet array.
public appendStyleSheet ( string $path )
$path string Path to the stylesheet. It can be relative path to the Public/static folder or a full http path.

assign() публичный Метод

Assign variables to the view.
public assign ( array $data, string $root = 'Ctrl' )
$data array List of variables that should be assigned.
$root string Variable root. Default root is Ctrl.

getAssignedData() публичный Метод

Get a list of assigned view data.
public getAssignedData ( ) : array
Результат array

getAutoload() публичный Метод

Get the state of view template auto load.
public getAutoload ( ) : boolean
Результат boolean

getMeta() публичный Метод

Get the meta list.
public getMeta ( ) : array
Результат array

getMetaHtml() публичный Метод

Get the meta list as html tags.
public getMetaHtml ( ) : string
Результат string

getScripts() публичный Метод

Get the script list.
public getScripts ( ) : array
Результат array

getScriptsHtml() публичный Метод

Get the script list as html tags.
public getScriptsHtml ( ) : string
Результат string

getStyleSheets() публичный Метод

Get the stylesheet list.
public getStyleSheets ( ) : array
Результат array

getStyleSheetsHtml() публичный Метод

Get the stylesheet list as html tags.
public getStyleSheetsHtml ( ) : string
Результат string

getTemplate() публичный Метод

Get the assigned view template.
public getTemplate ( ) : string
Результат string Path to the view template.

getTitle() публичный Метод

Get the current page title.
public getTitle ( ) : string
Результат string

getTitleHtml() публичный Метод

Get the current page title as html tag.
public getTitleHtml ( ) : string
Результат string

prependScript() публичный Метод

Prepends a script to the script array.
public prependScript ( string $path, string $type = 'text/javascript' )
$path string Path to the script. It can be relative path to the Public/static folder or a full http path.
$type string Script type, default is 'text/javascript'.

prependStyleSheet() публичный Метод

Prepends a stylesheet to the stylesheet array.
public prependStyleSheet ( string $path )
$path string Path to the stylesheet. It can be relative path to the Public/static folder or a full http path.

setAutoload() публичный Метод

Set the view template auto load.
public setAutoload ( boolean $autoload )
$autoload boolean Should the view template file be auto loaded or not.

setMeta() публичный Метод

Set a html meta tag.
public setMeta ( string $name, string $content )
$name string Meta name.
$content string Meta value.

setTemplate() публичный Метод

Set the view template file.
public setTemplate ( string $template )
$template string Path to template file.

setTitle() публичный Метод

Set the page title.
public setTitle ( string $title )
$title string Page title.