Networking\InitCmsBundle\Controller\FrontendPageController::getLiveParameters PHP Method

getLiveParameters() public method

public getLiveParameters ( Request $request, Networking\InitCmsBundle\Model\PageSnapshot $pageSnapshot )
$request Symfony\Component\HttpFoundation\Request
$pageSnapshot Networking\InitCmsBundle\Model\PageSnapshot
    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());
    }