public function getLiveParameters(Request $request, PageSnapshot $pageSnapshot)
{
/** @var $page PageInterface */
$page = $this->getPageHelper()->unserializePageSnapshotData($pageSnapshot, false);
if (!$page->isActive()) {
throw new NotFoundHttpException();
}
if ($redirect = $this->getRedirect($request, $page)) {
return $redirect;
}
if ($page->getVisibility() != PageInterface::VISIBILITY_PUBLIC) {
if (false === $this->get('security.authorization_checker')->isGranted('ROLE_USER')) {
throw new AccessDeniedException();
}
}
return array('page' => $page, 'admin_pool' => $this->getAdminPool());
}