trait TwigTrait

Twig trait.

Methods

Response
render(string $view, array $parameters = array(), Response $response = null)

Renders a view and returns a Response.

string
renderView(string $view, array $parameters = array())

Renders a view.

Details

at line 35
Response render(string $view, array $parameters = array(), Response $response = null)

Renders a view and returns a Response.

To stream a view, pass an instance of StreamedResponse as a third argument.

Parameters

string $view The view name
array $parameters An array of parameters to pass to the view
Response $response A Response instance

Return Value

Response A Response instance

at line 61
string renderView(string $view, array $parameters = array())

Renders a view.

Parameters

string $view The view name
array $parameters An array of parameters to pass to the view

Return Value

string The rendered view