diff --git a/vendor/magento/module-sitemap/Model/Sitemap.php b/vendor/magento/module-sitemap/Model/Sitemap.php index f0b37aa..693584e 100644 --- a/vendor/magento/module-sitemap/Model/Sitemap.php +++ b/vendor/magento/module-sitemap/Model/Sitemap.php @@ -299,63 +299,32 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel implements \Magento /** * Collect all sitemap items * * @return void * @deprecated 100.3.0 * @see ItemProviderInterface * @since 100.2.0 */ public function collectSitemapItems() { - /** @var $helper \Magento\Sitemap\Helper\Data */ - $helper = $this->_sitemapData; - $storeId = $this->getStoreId(); - - $this->addSitemapItem( - new DataObject( - [ - 'changefreq' => $helper->getCategoryChangefreq($storeId), - 'priority' => $helper->getCategoryPriority($storeId), - 'collection' => $this->_categoryFactory->create()->getCollection($storeId), - ] - ) - ); - - $this->addSitemapItem( - new DataObject( - [ - 'changefreq' => $helper->getProductChangefreq($storeId), - 'priority' => $helper->getProductPriority($storeId), - 'collection' => $this->_productFactory->create()->getCollection($storeId), - ] - ) - ); - - $this->addSitemapItem( - new DataObject( - [ - 'changefreq' => $helper->getPageChangefreq($storeId), - 'priority' => $helper->getPagePriority($storeId), - 'collection' => $this->_cmsFactory->create()->getCollection($storeId), - ] - ) - ); + return; } /** * Initialize sitemap * * @return void */ protected function _initSitemapItems() { $sitemapItems = $this->itemProvider->getItems($this->getStoreId()); + $this->collectSitemapItems(); $mappedItems = $this->mapToSitemapItem(); $this->_sitemapItems = array_merge($sitemapItems, $mappedItems); $this->_tags = [ self::TYPE_INDEX => [ self::OPEN_TAG_KEY => '' . PHP_EOL . '' . PHP_EOL, self::CLOSE_TAG_KEY => '',