protected function JsResponse::render in JS Callback Handler 8.3
Processes the content for output.
If content is a render array, it may contain attached assets to be processed.
Parameters
array|string $data: The data to be rendered, passed by reference.
Return value
string HTML rendered content.
1 call to JsResponse::render()
File
- src/
JsResponse.php, line 151
Class
- JsResponse
- JsResponse.
Namespace
Drupal\jsCode
protected function render(&$data = []) {
// Immediately return if data is not renderable.
if (!$this
->isRenderable($data)) {
return $data;
}
return trim(\Drupal::service('renderer')
->renderRoot($data));
}