@@ -52,12 +52,7 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements
52
52
* @var CategoryRepositoryInterface
53
53
*/
54
54
protected $ categoryRepository ;
55
-
56
- /**
57
- * @var \Magento\Framework\View\ConfigInterface
58
- */
59
- protected $ viewConfig ;
60
-
55
+
61
56
/**
62
57
* @var \Magento\Framework\Config\View
63
58
*/
@@ -71,7 +66,6 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements
71
66
* @param \Magento\Catalog\Helper\Image $imageHelper
72
67
* @param \Magento\Customer\Model\Session $customerSession
73
68
* @param CategoryRepositoryInterface $categoryRepository
74
- * @param \Magento\Framework\View\ConfigInterface $viewConfig
75
69
* @param array $data
76
70
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
77
71
*/
@@ -83,7 +77,6 @@ public function __construct(
83
77
\Magento \Catalog \Helper \Image $ imageHelper ,
84
78
\Magento \Customer \Model \Session $ customerSession ,
85
79
CategoryRepositoryInterface $ categoryRepository ,
86
- \Magento \Framework \View \ConfigInterface $ viewConfig ,
87
80
array $ data = []
88
81
) {
89
82
$ this ->imageHelper = $ imageHelper ;
@@ -93,7 +86,6 @@ public function __construct(
93
86
$ this ->rssUrlBuilder = $ rssUrlBuilder ;
94
87
$ this ->storeManager = $ context ->getStoreManager ();
95
88
$ this ->categoryRepository = $ categoryRepository ;
96
- $ this ->viewConfig = $ viewConfig ;
97
89
parent ::__construct ($ context , $ data );
98
90
}
99
91
@@ -136,9 +128,9 @@ public function getRssData()
136
128
$ title = $ category ->getName ();
137
129
$ data = ['title ' => $ title , 'description ' => $ title , 'link ' => $ newUrl , 'charset ' => 'UTF-8 ' ];
138
130
139
- $ attributes = $ this ->getConfigView ()
131
+ $ attributes = $ this ->_viewConfig -> getViewConfig ()
140
132
->getMediaAttributes ('Magento_Catalog ' , $ this ->imageHelper ::MEDIA_TYPE_CONFIG_NODE , 'rss_thumbnail ' );
141
-
133
+
142
134
/** @var $product \Magento\Catalog\Model\Product */
143
135
foreach ($ this ->rssModel ->getProductCollection ($ category , $ this ->getStoreId ()) as $ product ) {
144
136
$ product ->setAllowedInRss (true );
@@ -297,17 +289,4 @@ public function isAuthRequired()
297
289
{
298
290
return false ;
299
291
}
300
-
301
- /**
302
- * Retrieve config view
303
- *
304
- * @return \Magento\Framework\Config\View
305
- */
306
- protected function getConfigView ()
307
- {
308
- if (!$ this ->configView ) {
309
- $ this ->configView = $ this ->viewConfig ->getViewConfig ();
310
- }
311
- return $ this ->configView ;
312
- }
313
292
}
0 commit comments