storeManager = $storeManager; $this->rssModel = $rssModel; parent::__construct($context, $data); } /** * {@inheritdoc} */ public function getRssData() { $newUrl = $this->getUrl('rss/catalog/review', ['_secure' => true, '_nosecret' => true]); $title = __('Pending product review(s)'); $data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8']; foreach ($this->rssModel->getProductCollection() as $item) { if ($item->getStoreId()) { $this->_urlBuilder->setScope($item->getStoreId()); } $url = $this->getUrl('catalog/product/view', ['id' => $item->getId()]); $reviewUrl = $this->getUrl('review/product/edit/', [ 'id' => $item->getReviewId(), '_secure' => true, '_nosecret' => true ]); $storeName = $this->storeManager->getStore($item->getStoreId())->getName(); $description = '
' . __('Product: %2
', $url, $item->getName())
. __('Summary of review: %1
', $item->getTitle()) . __('Review: %1
', $item->getDetail())
. __('Store: %1
', $storeName)
. __('Click here to see the review.', $reviewUrl)
. '