DynamicPageCacheSubscriber::renderArrayToResponse

protected DynamicPageCacheSubscriber::renderArrayToResponse(array $render_array)

Gets the embedded Response object in a render array.

Parameters

array $render_array: A render array with a #response property.

Return value

\Drupal\Core\Cache\CacheableResponseInterface The cacheable response object.

See also

responseToRenderArray()

File

core/modules/dynamic_page_cache/src/EventSubscriber/DynamicPageCacheSubscriber.php, line 300

Class

DynamicPageCacheSubscriber
Returns cached responses as early and avoiding as much work as possible.

Namespace

Drupal\dynamic_page_cache\EventSubscriber

Code

protected function renderArrayToResponse(array $render_array) {
  return $render_array['#response'];
}
doc_Drupal
2016-10-29 09:03:28
Comments
Leave a Comment

Please login to continue.