/** * Renders the content * @return string Returns the rendered content */ function Render() { if (!self::Guard()->Allow(Action::Read(), $this->content)) { return ''; } ContentTranslator::Singleton()->SetContent($this->content); $module = ClassFinder::CreateFrontendModule($this->content->GetType()); $module->SetTreeItem($this->tree, $this->item); return $module->Render(); }
private function PageAllowed(Page $page) { if ($page->GetType() != (string) PageType::Normal() || $page->GetSitemapRelevance() == 0) { return false; } return $this->guard->Allow(Action::Read(), $page); }