private function initBasePages($languages)
 {
     $templates = $this->theme->getTemplates();
     foreach ($languages as $language) {
         $blocks = $this->blockRepository->retrieveContents(array(1, $language->getId()), 1);
         foreach ($templates as $template) {
             $this->pageBlocks->setBlocks($blocks);
             $this->pages['base'][] = $this->initPageTree($language, null, $template);
         }
     }
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function refresh($languageId, $pageId)
 {
     if (!is_numeric($languageId)) {
         throw new General\InvalidArgumentTypeException('exception_invalid_value_for_page_id');
     }
     if (!is_numeric($pageId)) {
         throw new General\InvalidArgumentTypeException('exception_invalid_value_for_language_id');
     }
     if ($languageId == $this->idLanguage && $pageId == $this->idPage) {
         return $this;
     }
     $this->idLanguage = $languageId;
     $this->idPage = $pageId;
     $this->alBlocks = $this->blockRepository->retrieveContents(array(1, $languageId), array(1, $pageId));
     $this->arrangeBlocks();
     return $this;
 }