PHP Class Webiny\Component\Bootstrap\ApplicationClasses\View

Afficher le fichier Open project: Webiny/Framework Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

appendScript() public méthode

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() public méthode

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() public méthode

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() public méthode

Get a list of assigned view data.
public getAssignedData ( ) : array
Résultat array

getAutoload() public méthode

Get the state of view template auto load.
public getAutoload ( ) : boolean
Résultat boolean

getMeta() public méthode

Get the meta list.
public getMeta ( ) : array
Résultat array

getMetaHtml() public méthode

Get the meta list as html tags.
public getMetaHtml ( ) : string
Résultat string

getScripts() public méthode

Get the script list.
public getScripts ( ) : array
Résultat array

getScriptsHtml() public méthode

Get the script list as html tags.
public getScriptsHtml ( ) : string
Résultat string

getStyleSheets() public méthode

Get the stylesheet list.
public getStyleSheets ( ) : array
Résultat array

getStyleSheetsHtml() public méthode

Get the stylesheet list as html tags.
public getStyleSheetsHtml ( ) : string
Résultat string

getTemplate() public méthode

Get the assigned view template.
public getTemplate ( ) : string
Résultat string Path to the view template.

getTitle() public méthode

Get the current page title.
public getTitle ( ) : string
Résultat string

getTitleHtml() public méthode

Get the current page title as html tag.
public getTitleHtml ( ) : string
Résultat string

prependScript() public méthode

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() public méthode

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() public méthode

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

setMeta() public méthode

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

setTemplate() public méthode

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

setTitle() public méthode

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