示例#1
0
 private function AttachPageContent($isNew)
 {
     $provider = new PageContentTreeProvider($this->Page(), $this->Area());
     $tree = new TreeBuilder($provider);
     $pageContent = $this->Content()->GetPageContent();
     if (!$pageContent) {
         $pageContent = new PageContent();
         $pageContent->SetArea($this->Area());
         $pageContent->SetPage($this->Page());
         $provider->AttachContent($pageContent, $this->Content());
     }
     if ($isNew) {
         $tree->Insert($pageContent, $this->ParentItem(), $this->PreviousItem());
     }
 }
示例#2
0
 protected function NextPageContent()
 {
     $pageContent = $this->pageContent;
     $this->pageContent = $this->tree->NextOf($this->pageContent);
     return $pageContent;
 }
 function Render()
 {
     $renderer = new ContentsRenderer($this->tree->TopMost(), $this->tree);
     return $renderer->Render();
 }
示例#4
0
 private function RenderPageChildren()
 {
     $pageContent = $this->content->GetPageContent();
     $provider = new PageContentTreeProvider($pageContent->GetPage(), $pageContent->GetArea());
     $renderer = new ContentsRenderer($provider->FirstChildOf($pageContent), $provider);
     return $renderer->Render();
 }