ViewInterface
Interface of a view
since v11, will be removed with v12. Use TYPO3Fluid\Fluid\View\ViewInterface instead.
Table of Contents
Methods
- assign() : self
- Add a variable to the view data collection.
- assignMultiple() : self
- Add multiple variables to the view data collection
- initializeView() : mixed
- Initializes this view.
- render() : string
- Renders the view
- setControllerContext() : mixed
- Sets the current controller context
Methods
assign()
Add a variable to the view data collection.
public
assign(string $key, mixed $value) : self
Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible
Parameters
- $key : string
-
Key of variable
- $value : mixed
-
Value of object
Return values
self —an instance of $this, to enable chaining
assignMultiple()
Add multiple variables to the view data collection
public
assignMultiple(array<string|int, mixed> $values) : self
Parameters
- $values : array<string|int, mixed>
-
array in the format array(key1 => value1, key2 => value2)
Return values
self —an instance of $this, to enable chaining
initializeView()
Initializes this view.
public
initializeView() : mixed
render()
Renders the view
public
render() : string
Return values
string —The rendered view
setControllerContext()
Sets the current controller context
public
setControllerContext(ControllerContext $controllerContext) : mixed
since v11, will be removed with v12.
Parameters
- $controllerContext : ControllerContext