public function viewBlock(Block $block, array $params = array(), array $cacheSettings = array())
{
$response = new Response();
if ($this->getParameter('content.view_cache') === true) {
$response->setPublic();
if (isset($cacheSettings['smax-age']) && is_int($cacheSettings['smax-age'])) {
$response->setSharedMaxAge((int) $cacheSettings['smax-age']);
}
if (isset($cacheSettings['max-age']) && is_int($cacheSettings['max-age'])) {
$response->setMaxAge((int) $cacheSettings['max-age']);
}
}
$response->setContent($this->viewManager->renderBlock($block, $params + array('pageService' => $this->pageService, 'valid_items' => $this->pageService->getValidBlockItems($block))));
return $response;
}