/** * Initializes the html frontend module * @return boolean */ protected function Init() { $contentContainer = ContentContainer::Schema()->ByContent($this->content); $tree = new ContainerContentTreeProvider($contentContainer->GetContainer()); $renderer = new ContentsRenderer($tree->TopMost(), $tree); $this->contents = $renderer->Render(); return parent::Init(); }
protected function NextContainerContent() { $containerContent = $this->containerContent; $this->containerContent = $this->tree->NextOf($this->containerContent); return $containerContent; }
/** * Attaches the content to the container * @param boolean $isNew */ private function AttachContainerContent($isNew) { $provider = new ContainerContentTreeProvider($this->Container()); $tree = new TreeBuilder($provider); $containerContent = $this->Content()->GetContainerContent(); if (!$containerContent) { $containerContent = new ContainerContent(); $containerContent->SetContainer($this->Container()); $provider->AttachContent($containerContent, $this->Content()); } if ($isNew) { $tree->Insert($containerContent, $this->ParentItem(), $this->PreviousItem()); } }
private function RenderContainerChildren() { $containerContent = $this->content->GetContainerContent(); $provider = new ContainerContentTreeProvider($containerContent->GetContainer()); $renderer = new ContentsRenderer($provider->FirstChildOf($containerContent), $provider); return $renderer->Render(); }