Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
renderArray example
public
function
renderArrayEarly
(
)
{
$render_array
=
$this
->
earlyRenderContent
(
)
;
return
[
'#markup' =>
$this
->renderer->
render
(
$render_array
)
,
]
;
}
public
function
ajaxResponse
(
)
{
$response
=
new
AjaxResponse
(
)
;
$response
->
addCommand
(
new
InsertCommand
(
NULL,
$this
->
renderArray
(
)
)
)
;
return
$response
;
}
public
function
ajaxResponseEarly
(
)
{
$response
=
new
AjaxResponse
(
)
;
$response
->
addCommand
(
new
InsertCommand
(
NULL,
$this
->
renderArrayEarly
(
)
)
)
;
return
$response
;
}
public
function
response
(
)
{
return
new
Response
(
'Hello world!'
)
;
}