PHP Interface ManaPHP\Mvc\ViewInterface

Afficher le fichier Open project: manaphp/manaphp

Méthodes publiques

Méthode Description
getContent ( ) : string Returns cached output from another view stage
getVar ( string $name = null ) : mixed Returns a parameter previously set in the view
partial ( string $path, array $vars = [] ) Renders a partial view
pick ( string $view ) : static Choose a view different to render than last-controller/last-action
render ( string $controller, string $action ) Executes render process from dispatching data
setContent ( string $content ) : static Externally sets the view content
setLayout ( false | string $layout = 'Default' ) : static
setVar ( string $name, mixed $value ) : static Adds parameter to view
setVars ( array $vars ) : static Adds parameters to view
widget ( string $widget, array $vars = [], integer | array $cacheOptions = null ) Renders a widget

Method Details

getContent() public méthode

Returns cached output from another view stage
public getContent ( ) : string
Résultat string

getVar() public méthode

Returns a parameter previously set in the view
public getVar ( string $name = null ) : mixed
$name string
Résultat mixed

partial() public méthode

Show a partial inside another view $this->partial('shared/footer'); Show a partial inside another view with parameters $this->partial('shared/footer', array('content' => $html));
public partial ( string $path, array $vars = [] )
$path string
$vars array

pick() public méthode

Choose a view different to render than last-controller/last-action
public pick ( string $view ) : static
$view string
Résultat static

render() public méthode

Executes render process from dispatching data
public render ( string $controller, string $action )
$controller string
$action string

setContent() public méthode

Externally sets the view content
public setContent ( string $content ) : static
$content string
Résultat static

setLayout() public méthode

public setLayout ( false | string $layout = 'Default' ) : static
$layout false | string
Résultat static

setVar() public méthode

Adds parameter to view
public setVar ( string $name, mixed $value ) : static
$name string
$value mixed
Résultat static

setVars() public méthode

Adds parameters to view
public setVars ( array $vars ) : static
$vars array
Résultat static

widget() public méthode

Renders a widget
public widget ( string $widget, array $vars = [], integer | array $cacheOptions = null )
$widget string
$vars array
$cacheOptions integer | array