Skip to content

Commit 03a3f2e

Browse files
author
Jeroen van Leusden
committed
StoreManager already exists in parent class
1 parent 28e6421 commit 03a3f2e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

app/code/Magento/ProductAlert/Block/Email/AbstractEmail.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ abstract class AbstractEmail extends \Magento\Framework\View\Element\Template
5151
*/
5252
private $appEmulation;
5353

54-
/**
55-
* @var \Magento\Store\Model\StoreManagerInterface
56-
*/
57-
private $storeManager;
58-
5954
/**
6055
* @param \Magento\Framework\View\Element\Template\Context $context
6156
* @param \Magento\Framework\Filter\Input\MaliciousCode $maliciousCode
@@ -75,7 +70,6 @@ public function __construct(
7570
$this->imageBuilder = $imageBuilder;
7671
$this->priceCurrency = $priceCurrency;
7772
$this->_maliciousCode = $maliciousCode;
78-
$this->storeManager = $context->getStoreManager();
7973
$this->appEmulation = $appEmulation
8074
?: \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Store\Model\App\Emulation::class);
8175

@@ -239,7 +233,7 @@ public function getProductPriceHtml(
239233
public function getImage($product, $imageId, $attributes = [])
240234
{
241235
$this->appEmulation->startEnvironmentEmulation(
242-
$this->storeManager->getStore()->getId(),
236+
$this->_storeManager->getStore()->getId(),
243237
\Magento\Framework\App\Area::AREA_FRONTEND,
244238
true
245239
);

0 commit comments

Comments
 (0)