/**
  * @param $pages
  * @return array
  */
 public function getEntriesFromPages($pages)
 {
     $urlEntries = [];
     foreach ($pages as $page) {
         if ($page['doktype'] == 1) {
             $urlEntry = new UrlEntry();
             $uri = $this->uriBuilder->reset()->setTargetPageUid($page['uid'])->setCreateAbsoluteUri(true)->build();
             $urlEntry->setLoc($uri);
             $urlEntry->setLastmod(date('Y-m-d', $page['tstamp']));
             if (isset($page['sitemap_priority'])) {
                 $urlEntry->setPriority(sprintf('%01.1f', $page['sitemap_priority'] / 10));
             }
             if (isset($page['sitemap_changefreq'])) {
                 $urlEntry->setChangefreq($page['sitemap_changefreq']);
             }
             $urlEntries[] = $urlEntry;
         }
     }
     return $urlEntries;
 }
 /**
  * @param $pages
  */
 public function getEntriesFromPages($pages)
 {
     foreach ($pages as $page) {
         if (intval($page['doktype']) === 1) {
             $urlEntry = new UrlEntry();
             $uri = $this->generatePageUrl($page['uid']);
             $urlEntry->setLoc($uri);
             $urlEntry->setLastmod(date('Y-m-d', $page['tstamp']));
             if (isset($page['sitemap_priority'])) {
                 $urlEntry->setPriority(number_format($page['sitemap_priority'] / 10, 1, '.', ''));
             }
             if (isset($page['sitemap_changefreq'])) {
                 $urlEntry->setChangefreq($page['sitemap_changefreq']);
             }
             $this->entryStorage->attach($urlEntry);
         }
     }
 }