wishlistHelper = $wishlistHelper; $this->wishlistBlock = $wishlistBlock; $this->outputHelper = $outputHelper; $this->imageHelper = $imageHelper; $this->urlBuilder = $urlBuilder; $this->scopeConfig = $scopeConfig; $this->eventManager = $eventManager; $this->customerFactory = $customerFactory; $this->layout = $layout; $this->request = $request; } /** * Check if RSS feed allowed * * @return mixed */ public function isAllowed() { return (bool)$this->scopeConfig->getValue( 'rss/wishlist/active', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } /** * Get RSS feed items * * @return array */ public function getRssData() { $wishlist = $this->getWishlist(); if ($wishlist->getId()) { $data = $this->getHeader(); /** @var $wishlistItem \Magento\Wishlist\Model\Item */ foreach ($wishlist->getItemCollection() as $wishlistItem) { /* @var $product \Magento\Catalog\Model\Product */ $product = $wishlistItem->getProduct(); $productUrl = $this->wishlistBlock->getProductUrl($product, ['_rss' => true]); $product->setAllowedInRss(true); $product->setAllowedPriceInRss(true); $product->setProductUrl($productUrl); $args = ['product' => $product]; $this->eventManager->dispatch('rss_wishlist_xml_callback', $args); if (!$product->getAllowedInRss()) { continue; } $description = '