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 $this->scopeConfig->isSetFlag('rss/wishlist/active', ScopeInterface::SCOPE_STORE) && $this->getWishlist()->getCustomerId() === $this->wishlistHelper->getCustomer()->getId(); } /** * Get RSS feed items * * @return array * @throws \Magento\Framework\Exception\LocalizedException */ 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 = '