/** * Writes sitemap content to the output. * * @return void */ public function main() { header('Content-type: text/xml'); if ($this->renderer) { echo $this->renderer->getStartTags(); } $this->generateSitemapContent(); if ($this->renderer) { echo $this->renderer->getEndTags(); } }
/** * Outputs information about single page * * @param array $pageInfo Page information (needs 'uid' and 'SYS_LASTCHANGED' columns) * @return void */ protected function writeSingleUrl(array $pageInfo) { if ($this->shouldIncludePageInSitemap($pageInfo) && ($url = $this->getPageLink($pageInfo['uid']))) { echo $this->renderer->renderEntry($url, $pageInfo['title'], $this->getLastMod($pageInfo), $this->getChangeFrequency($pageInfo), '', $pageInfo['tx_ddgooglesitemap_priority']); // Post-process current page and possibly append data // @see http://forge.typo3.org/issues/45637 foreach ($this->hookObjects as $hookObject) { if (is_callable(array($hookObject, 'postProcessPageInfo'))) { $parameters = array('pageInfo' => &$pageInfo, 'generatedItemCount' => &$this->generatedItemCount, 'offset' => $this->offset, 'limit' => $this->limit, 'renderer' => $this->renderer, 'pObj' => $this); /** @noinspection PhpUndefinedMethodInspection */ $hookObject->postProcessPageInfo($parameters); } } } }