PHP Interface Neos\Flow\Mvc\View\ViewInterface

Afficher le fichier Open project: neos/flow-development-collection Interface Usage Examples

Méthodes publiques

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

Method Details

assign() public méthode

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
Résultat Neos\Flow\Mvc\View\ViewInterface an instance of $this, to enable chaining

assignMultiple() public méthode

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)
Résultat Neos\Flow\Mvc\View\ViewInterface an instance of $this, to enable chaining

canRender() public méthode

Tells if the view implementation can render the view for the given context.
public canRender ( ControllerContext $controllerContext ) : boolean
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
Résultat boolean TRUE if the view has something useful to display, otherwise FALSE

createWithOptions() public static méthode

Factory method to create an instance with given options.
public static createWithOptions ( array $options ) : Neos\Flow\Mvc\View\ViewInterface
$options array
Résultat Neos\Flow\Mvc\View\ViewInterface

render() public méthode

Renders the view
public render ( ) : string
Résultat string The rendered view

setControllerContext() public méthode

Sets the current controller context
public setControllerContext ( ControllerContext $controllerContext ) : void
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext Context of the controller associated with this view
Résultat void