Skip to content

Commit 6b77027

Browse files
DenisSaltanahmedovMastiuhin Oleksandr
authored andcommitted
Update Product.php
1 parent 986f2c1 commit 6b77027

File tree

1 file changed

+7
-7
lines changed
  • app/code/Magento/Sitemap/Model/ResourceModel/Catalog

1 file changed

+7
-7
lines changed

app/code/Magento/Sitemap/Model/ResourceModel/Catalog/Product.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Magento\Store\Model\Store;
1010
use Magento\Framework\App\ObjectManager;
1111
use Magento\Store\Model\ScopeInterface;
12-
use Magento\Framework\App\Config\ScopeConfigInterface as ConfigInterface;
1312
use Magento\Catalog\Helper\Product as HelperProduct;
1413

1514
/**
@@ -91,12 +90,13 @@ class Product extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
9190
* @var \Magento\Catalog\Helper\Image
9291
*/
9392
private $catalogImageHelper;
93+
9494
/**
9595
* Scope Config
9696
*
97-
* @var ConfigInterface
97+
* @var \Magento\Framework\App\Config\ScopeConfigInterface
9898
*/
99-
protected $scopeConfig;
99+
private $scopeConfig;
100100

101101
/**
102102
* @param \Magento\Framework\Model\ResourceModel\Db\Context $context
@@ -108,7 +108,7 @@ class Product extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
108108
* @param \Magento\Catalog\Model\ResourceModel\Product\Gallery $mediaGalleryResourceModel
109109
* @param \Magento\Catalog\Model\Product\Gallery\ReadHandler $mediaGalleryReadHandler
110110
* @param \Magento\Catalog\Model\Product\Media\Config $mediaConfig
111-
* @param ConfigInterface $scopeConfig
111+
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
112112
* @param string $connectionName
113113
* @param \Magento\Catalog\Model\Product $productModel
114114
* @param \Magento\Catalog\Helper\Image $catalogImageHelper
@@ -124,7 +124,7 @@ public function __construct(
124124
\Magento\Catalog\Model\ResourceModel\Product\Gallery $mediaGalleryResourceModel,
125125
\Magento\Catalog\Model\Product\Gallery\ReadHandler $mediaGalleryReadHandler,
126126
\Magento\Catalog\Model\Product\Media\Config $mediaConfig,
127-
ConfigInterface $scopeConfig,
127+
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
128128
$connectionName = null,
129129
\Magento\Catalog\Model\Product $productModel = null,
130130
\Magento\Catalog\Helper\Image $catalogImageHelper = null
@@ -286,7 +286,7 @@ public function getCollection($storeId)
286286

287287
$connection = $this->getConnection();
288288
$urlsConfigCondition = '';
289-
if ($this->getCategoryProductURLsConfig($storeId)) {
289+
if ($this->isCategoryProductURLsConfig($storeId)) {
290290
$urlsConfigCondition = 'NOT ';
291291
}
292292

@@ -474,7 +474,7 @@ private function getProductImageUrl($image)
474474
*
475475
* @return bool
476476
*/
477-
protected function getCategoryProductURLsConfig($storeId)
477+
private function isCategoryProductURLsConfig($storeId)
478478
{
479479
return (bool)$this->scopeConfig->getValue(
480480
HelperProduct::XML_PATH_PRODUCT_URL_USE_CATEGORY,

0 commit comments

Comments
 (0)