Skip to content

Commit 0413854

Browse files
committed
remove unwanted property as it is declared into extend block
1 parent d6bd1d6 commit 0413854

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

app/code/Magento/Catalog/Block/Rss/Category.php

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements
5252
* @var CategoryRepositoryInterface
5353
*/
5454
protected $categoryRepository;
55-
56-
/**
57-
* @var \Magento\Framework\View\ConfigInterface
58-
*/
59-
protected $viewConfig;
60-
55+
6156
/**
6257
* @var \Magento\Framework\Config\View
6358
*/
@@ -71,7 +66,6 @@ class Category extends \Magento\Framework\View\Element\AbstractBlock implements
7166
* @param \Magento\Catalog\Helper\Image $imageHelper
7267
* @param \Magento\Customer\Model\Session $customerSession
7368
* @param CategoryRepositoryInterface $categoryRepository
74-
* @param \Magento\Framework\View\ConfigInterface $viewConfig
7569
* @param array $data
7670
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
7771
*/
@@ -83,7 +77,6 @@ public function __construct(
8377
\Magento\Catalog\Helper\Image $imageHelper,
8478
\Magento\Customer\Model\Session $customerSession,
8579
CategoryRepositoryInterface $categoryRepository,
86-
\Magento\Framework\View\ConfigInterface $viewConfig,
8780
array $data = []
8881
) {
8982
$this->imageHelper = $imageHelper;
@@ -93,7 +86,6 @@ public function __construct(
9386
$this->rssUrlBuilder = $rssUrlBuilder;
9487
$this->storeManager = $context->getStoreManager();
9588
$this->categoryRepository = $categoryRepository;
96-
$this->viewConfig = $viewConfig;
9789
parent::__construct($context, $data);
9890
}
9991

@@ -136,9 +128,9 @@ public function getRssData()
136128
$title = $category->getName();
137129
$data = ['title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8'];
138130

139-
$attributes = $this->getConfigView()
131+
$attributes = $this->_viewConfig->getViewConfig()
140132
->getMediaAttributes('Magento_Catalog', $this->imageHelper::MEDIA_TYPE_CONFIG_NODE, 'rss_thumbnail');
141-
133+
142134
/** @var $product \Magento\Catalog\Model\Product */
143135
foreach ($this->rssModel->getProductCollection($category, $this->getStoreId()) as $product) {
144136
$product->setAllowedInRss(true);
@@ -297,17 +289,4 @@ public function isAuthRequired()
297289
{
298290
return false;
299291
}
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-
}
313292
}

0 commit comments

Comments
 (0)