/** * @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']); }