public function setSiteLayout(MvcEvent $event)
    {
        /** @var \Zend\View\Model\ViewModel $viewModel */
        $viewModel = $event->getViewModel();

        /* Add on for non CMS pages */
        $fakePage = new Page(
            Tracking::UNKNOWN_USER_ID,
            'Fake page for non CMS pages in ' . get_class($this)
        );
        $fakeRevision = new Revision(
            Tracking::UNKNOWN_USER_ID,
            'Fake revision for non CMS pages in ' . get_class($this)
        );

        $fakePage->setCurrentRevision($fakeRevision);

        $currentSite = $this->getCurrentSite();

        $viewModel->setVariable('page', $fakePage);
        $viewModel->setVariable('site', $currentSite);

        $template = $this->getSiteLayoutTemplate();

        $viewModel->setTemplate('layout/' . $template);

        return null;
    }
public function setSiteLayout(MvcEvent $event)
    {
        /** @var \Zend\View\Model\ViewModel $viewModel */
        $viewModel = $event->getViewModel();

        /* Add on for non CMS pages */
        $fakePage = new Page(
            Tracking::UNKNOWN_USER_ID,
            'Fake page for non CMS pages in ' . get_class($this)
        );
        $fakeRevision = new Revision(
            Tracking::UNKNOWN_USER_ID,
            'Fake revision for non CMS pages in ' . get_class($this)
        );

        $fakePage->setCurrentRevision($fakeRevision);

        $currentSite = $this->getCurrentSite();

        $viewModel->setVariable('page', $fakePage);
        $viewModel->setVariable('site', $currentSite);

        $template = $this->getSiteLayoutTemplate();

        $viewModel->setTemplate('layout/' . $template);

        return null;
    }
public function setSiteLayout ( MvcEvent $ event ) { /** @var \Zend\View\Model\ViewModel $viewModel */ $ viewModel = $ event -> getViewModel ( ) ; /* Add on for non CMS pages */ $ fakePage = new Page ( Tracking :: UNKNOWN_USER_ID , 'Fake page for non CMS pages in ' . get_class ( $ this ) ) ; $ fakeRevision = new Revision ( Tracking :: UNKNOWN_USER_ID , 'Fake revision for non CMS pages in ' . get_class ( $ this ) ) ; $ fakePage -> setCurrentRevision ( $ fakeRevision ) ; $ currentSite = $ this -> getCurrentSite ( ) ; $ viewModel -> setVariable ( 'page' , $ fakePage ) ; $ viewModel -> setVariable ( 'site' , $ currentSite ) ; $ template = $ this -> getSiteLayoutTemplate ( ) ; $ viewModel -> setTemplate ( 'layout/' . $ template ) ; return null ; }
Set Site Layout

@param MvcEvent $event Zend MVC Event object

@return null
Set Site Layout