コード例 #1
0
 /**
  * @return bool|mixed
  */
 public function indexAction()
 {
     $this->cacheUtility->setCacheIdentifier(array($this->cacheIdentifier));
     $cachedHtmlOutput = $this->cacheUtility->getCache();
     if (!$cachedHtmlOutput) {
         $pageWithMedia = $this->getRecursiveParentWithMedia($this->pid);
         if ($pageWithMedia != false) {
             $this->view->assign('data', array('media' => $pageWithMedia->getMedia()));
         }
         $htmlOutput = $this->view->render();
         $this->cacheUtility->setCache($htmlOutput);
         return $htmlOutput;
     }
     return $cachedHtmlOutput;
 }
コード例 #2
0
 /**
  * @return string|void
  */
 public function indexAction()
 {
     $cacheIdentifier = $this->getCacheIdentifier();
     $this->cacheUtility->setCacheIdentifier($cacheIdentifier);
     $html = $this->cacheUtility->getCache();
     if (!$html) {
         $activePages = $this->getActivePages();
         $rootPageId = $this->getRootPageIdWithEntryLevel();
         $this->view->assignMultiple(array('pId' => $rootPageId, 'layer' => 0, 'menuType' => $this->menuType, 'activePages' => $activePages, 'showLevels' => $this->showLevels - 1, 'pagesToExclude' => $this->settings['pagesToExclude']));
         $html = $this->view->render();
         $this->cacheUtility->setCache($html);
     }
     return $html;
 }