public function Content() { if (!$this->content) { $this->content = ''; $children = $this->stageChildren(); foreach ($children as $child) { if ($child->type_code == 'bodycopy') { $this->content .= BodycopyContentExtractor::extractContent($child); } } } return $this->content; }
/** * Converts all contained bodycopies into content * * @param $linkTo * Whether to resolve links to local or remote page objects * * @return String */ public function Content($linkTo = 'local') { if (!$this->content) { $this->content = ''; $children = $this->DependentChildren(); foreach ($children as $child) { if ($child->type_code == 'bodycopy') { $this->content .= BodycopyContentExtractor::extractContent($child); } } $this->content = $this->convertContent($this->content, $linkTo); } return $this->content; }
public function Content($mode = null) { if (!$this->content) { $this->content = ''; $this->noResultsContent = ''; $pageChildren = $this->DependentChildren(); foreach ($pageChildren as $child) { // if it's a folder and titled 'type formats', contine if ($child->type_code == 'bodycopy') { if ($child->Title == 'Page Contents (No Results)') { $this->noResultsContent = BodycopyContentExtractor::extractContent($child); } else { if ($child->Title = 'Page Contents') { $this->content = BodycopyContentExtractor::extractContent($child); } } } } } if ($mode == 'NoResults') { return $this->noResultsContent; } return $this->content; }