private function checkTemplatesSlots() { $template = $this->pageTree->getTemplate(); if (null === $template) { return; } $language = $this->pageTree->getLanguage(); $page = $this->pageTree->getPage(); $languageId = null !== $language ? $language->getId() : null; $pageId = null !== $page ? $page->getId() : null; $slotsAligner = $this->container->get('red_kite_cms.repeated_slots_aligner'); $slotsAligner->setLanguageId($languageId)->setPageId($pageId)->align($template, $this->theme->getThemeSlots()->getSlots()); }
/** * Generates the template's subsections and the full template itself */ public function generateTemplate(PageTree $pageTree, ThemeInterface $theme, array $options) { $this->language = $pageTree->getLanguage(); $this->page = $pageTree->getPage(); switch ($options["type"]) { case 'Base': $this->template = $pageTree->getTemplate(); $this->generateBaseTemplate($pageTree, $theme, $options); $this->baseFolder = "/base"; $this->fileName = $this->template->getTemplateName(); break; case 'Pages': $this->generatePageTemplate($pageTree, $theme, $options); $this->baseFolder = ""; $this->fileName = $this->page->getPageName(); break; } return $this; }