@@ -52,7 +52,6 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements
52
52
* @var CategoryRepositoryInterface
53
53
*/
54
54
protected $ categoryRepository ;
55
-
56
55
/**
57
56
* @param \Magento\Framework\View\Element\Template\Context $context
58
57
* @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
@@ -122,8 +121,9 @@ public function getRssData()
122
121
$ newUrl = $ category ->getUrl ();
123
122
$ title = $ category ->getName ();
124
123
$ data = ['title ' => $ title , 'description ' => $ title , 'link ' => $ newUrl , 'charset ' => 'UTF-8 ' ];
125
-
126
- $ attributes = $ this ->_viewConfig ->getViewConfig ()->getMediaAttributes ('Magento_Catalog ' , $ this ->imageHelper ::MEDIA_TYPE_CONFIG_NODE , 'rss_thumbnail ' );
124
+ $ attributes = $ this ->_viewConfig
125
+ ->getViewConfig ()
126
+ ->getMediaAttributes ('Magento_Catalog ' , $ this ->imageHelper ::MEDIA_TYPE_CONFIG_NODE , 'rss_thumbnail ' );
127
127
/** @var $product \Magento\Catalog\Model\Product */
128
128
foreach ($ this ->rssModel ->getProductCollection ($ category , $ this ->getStoreId ()) as $ product ) {
129
129
$ product ->setAllowedInRss (true );
@@ -281,5 +281,18 @@ public function getFeeds()
281
281
public function isAuthRequired ()
282
282
{
283
283
return false ;
284
+ }
285
+
286
+ /**
287
+ * Retrieve config view
288
+ *
289
+ * @return \Magento\Framework\Config\View
290
+ */
291
+ private function getConfigView ()
292
+ {
293
+ if (!$ this ->configView ) {
294
+ $ this ->configView = $ this ->_viewConfig ->getViewConfig ();
295
+ }
296
+ return $ this ->configView ;
284
297
}
285
298
}
0 commit comments