|
5 | 5 | */
|
6 | 6 | namespace Magento\Theme\Controller\Result;
|
7 | 7 |
|
8 |
| -use Magento\Framework\App\ObjectManager; |
9 | 8 | use Magento\Framework\Controller\Result\Json;
|
10 | 9 | use Magento\Framework\Controller\ResultInterface;
|
11 | 10 | use Magento\Framework\Message\MessageInterface;
|
@@ -74,18 +73,17 @@ public function __construct(
|
74 | 73 | \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory,
|
75 | 74 | \Magento\Framework\Message\ManagerInterface $messageManager,
|
76 | 75 | \Magento\Framework\View\Element\Message\InterpretationStrategyInterface $interpretationStrategy,
|
77 |
| - \Magento\Framework\Serialize\Serializer\Json $serializer = null, |
78 |
| - InlineInterface $inlineTranslate = null, |
| 76 | + \Magento\Framework\Serialize\Serializer\Json $serializer, |
| 77 | + InlineInterface $inlineTranslate, |
79 | 78 | ConfigInterface $sessionConfig
|
80 | 79 | ) {
|
81 | 80 | $this->cookieManager = $cookieManager;
|
82 | 81 | $this->cookieMetadataFactory = $cookieMetadataFactory;
|
83 | 82 | $this->messageManager = $messageManager;
|
84 |
| - $this->serializer = $serializer ?: ObjectManager::getInstance() |
85 |
| - ->get(\Magento\Framework\Serialize\Serializer\Json::class); |
| 83 | + $this->serializer = $serializer; |
86 | 84 | $this->interpretationStrategy = $interpretationStrategy;
|
87 |
| - $this->inlineTranslate = $inlineTranslate ?: ObjectManager::getInstance()->get(InlineInterface::class); |
88 |
| - $this->sessionConfig = $sessionConfig ?: ObjectManager::getInstance()->get(ConfigInterface::class); |
| 85 | + $this->inlineTranslate = $inlineTranslate; |
| 86 | + $this->sessionConfig = $sessionConfig; |
89 | 87 | }
|
90 | 88 |
|
91 | 89 | /**
|
|
0 commit comments