Beispiel #1
0
 /**
  * @param array $info
  *
  * @throws \Exception
  */
 protected function validateAndInitInfo($info)
 {
     if (!isset($info['id']) || empty($info['id'])) {
         throw new \Exception('no page id given');
     }
     $this->pageId = $info['id'];
     if (!isset($info['structure']) || !is_array($info['structure'])) {
         throw new \Exception('no structure data given');
     }
     $this->structure = new SiteStructure($this->getCreatorContext());
     $this->structure->initFromArray($info['structure']);
 }
Beispiel #2
0
 /**
  * @param string $websiteId
  *
  * @return SiteStructure
  */
 protected function createInitializedSiteStructure($websiteId)
 {
     $structure = new SiteStructure($this->getCreatorContext());
     $structure->initByWebsiteId($websiteId, $this->reservedDirectories);
     return $structure;
 }
 /**
  * @param      $pageId
  * @param bool $forceFileName
  *
  * @return null|string
  */
 protected function getPageUrl($pageId, $forceFileName = true)
 {
     return $this->structure->getPageUrl($pageId, $forceFileName);
 }