PHP Интерфейс ManaPHP\Mvc\ViewInterface

Показать файл Открыть проект

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

Метод Описание
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

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

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

Returns cached output from another view stage
public getContent ( ) : string
Результат string

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

Returns a parameter previously set in the view
public getVar ( string $name = null ) : mixed
$name string
Результат mixed

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

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() публичный Метод

Choose a view different to render than last-controller/last-action
public pick ( string $view ) : static
$view string
Результат static

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

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

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

Externally sets the view content
public setContent ( string $content ) : static
$content string
Результат static

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

public setLayout ( false | string $layout = 'Default' ) : static
$layout false | string
Результат static

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

Adds parameter to view
public setVar ( string $name, mixed $value ) : static
$name string
$value mixed
Результат static

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

Adds parameters to view
public setVars ( array $vars ) : static
$vars array
Результат static

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

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