Exemplo n.º 1
0
 /**
  * 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();
 }
Exemplo n.º 2
0
 private function PageAllowed(Page $page)
 {
     if ($page->GetType() != (string) PageType::Normal() || $page->GetSitemapRelevance() == 0) {
         return false;
     }
     return $this->guard->Allow(Action::Read(), $page);
 }