PHP Интерфейс Neos\Flow\Mvc\View\ViewInterface

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

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

Метод Описание
assign ( string $key, mixed $value ) : Neos\Flow\Mvc\View\ViewInterface Add a variable to the view data collection.
assignMultiple ( array $values ) : Neos\Flow\Mvc\View\ViewInterface Add multiple variables to the view data collection
canRender ( ControllerContext $controllerContext ) : boolean Tells if the view implementation can render the view for the given context.
createWithOptions ( array $options ) : Neos\Flow\Mvc\View\ViewInterface Factory method to create an instance with given options.
render ( ) : string Renders the view
setControllerContext ( ControllerContext $controllerContext ) : void Sets the current controller context

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

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

Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible
public assign ( string $key, mixed $value ) : Neos\Flow\Mvc\View\ViewInterface
$key string Key of variable
$value mixed Value of object
Результат Neos\Flow\Mvc\View\ViewInterface an instance of $this, to enable chaining

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

Add multiple variables to the view data collection
public assignMultiple ( array $values ) : Neos\Flow\Mvc\View\ViewInterface
$values array array in the format array(key1 => value1, key2 => value2)
Результат Neos\Flow\Mvc\View\ViewInterface an instance of $this, to enable chaining

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

Tells if the view implementation can render the view for the given context.
public canRender ( ControllerContext $controllerContext ) : boolean
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
Результат boolean TRUE if the view has something useful to display, otherwise FALSE

createWithOptions() публичный статический Метод

Factory method to create an instance with given options.
public static createWithOptions ( array $options ) : Neos\Flow\Mvc\View\ViewInterface
$options array
Результат Neos\Flow\Mvc\View\ViewInterface

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

Renders the view
public render ( ) : string
Результат string The rendered view

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

Sets the current controller context
public setControllerContext ( ControllerContext $controllerContext ) : void
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext Context of the controller associated with this view
Результат void