/**
  * Creates an instance of this class
  */
 public function __construct()
 {
     $this->isNewsSitemap = GeneralUtility::_GET('type') === 'news';
     if ($this->isNewsSitemap) {
         $this->rendererClass = 'DmitryDulepov\\DdGooglesitemap\\Renderers\\NewsSitemapRenderer';
     }
     parent::__construct();
     $singlePid = intval(GeneralUtility::_GP('singlePid'));
     $this->singlePid = $singlePid && $this->isInRootline($singlePid) ? $singlePid : $GLOBALS['TSFE']->id;
     $this->useCategorySinglePid = (bool) GeneralUtility::_GP('useCategorySinglePid');
     $this->validateAndcreatePageList();
 }
 /**
  * Initializes the instance of this class. This constructir sets starting
  * point for the sitemap to the current page id
  */
 public function __construct()
 {
     parent::__construct();
     $excludePageTypes = GeneralUtility::intExplode(',', $GLOBALS['TSFE']->tmpl->setup['tx_ddgooglesitemap.']['excludePageType'], TRUE);
     if (count($excludePageTypes) > 0) {
         $this->excludedPageTypes = $excludePageTypes;
     }
     $pid = intval($GLOBALS['TSFE']->tmpl->setup['tx_ddgooglesitemap.']['forceStartPid']);
     if ($pid === 0 || $pid == $GLOBALS['TSFE']->id) {
         $this->pageList[$GLOBALS['TSFE']->id] = array('uid' => $GLOBALS['TSFE']->id, 'SYS_LASTCHANGED' => $GLOBALS['TSFE']->page['SYS_LASTCHANGED'], 'tx_ddgooglesitemap_lastmod' => $GLOBALS['TSFE']->page['tx_ddgooglesitemap_lastmod'], 'tx_ddgooglesitemap_priority' => $GLOBALS['TSFE']->page['tx_ddgooglesitemap_priority'], 'doktype' => $GLOBALS['TSFE']->page['doktype'], 'no_search' => $GLOBALS['TSFE']->page['no_search']);
     } else {
         $page = $GLOBALS['TSFE']->sys_page->getPage($pid);
         $this->pageList[$page['uid']] = array('uid' => $page['uid'], 'SYS_LASTCHANGED' => $page['SYS_LASTCHANGED'], 'tx_ddgooglesitemap_lastmod' => $page['tx_ddgooglesitemap_lastmod'], 'tx_ddgooglesitemap_priority' => $page['tx_ddgooglesitemap_priority'], 'doktype' => $page['doktype'], 'no_search' => $page['no_search']);
     }
     $this->renderer = GeneralUtility::makeInstance('DmitryDulepov\\DdGooglesitemap\\Renderers\\StandardSitemapRenderer');
     // Prepare user defined objects (if any)
     $this->hookObjects = array();
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dd_googlesitemap']['generateSitemapForPagesClass'])) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dd_googlesitemap']['generateSitemapForPagesClass'] as $classRef) {
             $this->hookObjects[] = GeneralUtility::getUserObj($classRef);
         }
     }
 }