|
6 | 6 | namespace Magento\Checkout\Block\Checkout;
|
7 | 7 |
|
8 | 8 | use Magento\Directory\Helper\Data as DirectoryHelper;
|
| 9 | +use Magento\Store\Api\StoreResolverInterface; |
9 | 10 | use Magento\Store\Model\StoreManagerInterface;
|
10 | 11 |
|
11 | 12 | /**
|
@@ -49,19 +50,21 @@ class DirectoryDataProcessor implements \Magento\Checkout\Block\Checkout\LayoutP
|
49 | 50 | /**
|
50 | 51 | * @param \Magento\Directory\Model\ResourceModel\Country\CollectionFactory $countryCollection
|
51 | 52 | * @param \Magento\Directory\Model\ResourceModel\Region\CollectionFactory $regionCollection
|
52 |
| - * @param StoreManagerInterface $storeManager |
| 53 | + * @param StoreResolverInterface $storeResolver |
53 | 54 | * @param DirectoryHelper $directoryHelper
|
| 55 | + * @param StoreManagerInterface $storeManager |
54 | 56 | */
|
55 | 57 | public function __construct(
|
56 | 58 | \Magento\Directory\Model\ResourceModel\Country\CollectionFactory $countryCollection,
|
57 | 59 | \Magento\Directory\Model\ResourceModel\Region\CollectionFactory $regionCollection,
|
58 |
| - StoreManagerInterface $storeManager, |
59 |
| - DirectoryHelper $directoryHelper |
| 60 | + StoreResolverInterface $storeResolver, |
| 61 | + DirectoryHelper $directoryHelper, |
| 62 | + StoreManagerInterface $storeManager = null |
60 | 63 | ) {
|
61 | 64 | $this->countryCollectionFactory = $countryCollection;
|
62 | 65 | $this->regionCollectionFactory = $regionCollection;
|
63 |
| - $this->storeManager = $storeManager; |
64 | 66 | $this->directoryHelper = $directoryHelper;
|
| 67 | + $this->storeManager = $storeManager ?: \Magento\Framework\App\ObjectManager::getInstance()->get(StoreManagerInterface::class); |
65 | 68 | }
|
66 | 69 |
|
67 | 70 | /**
|
|
0 commit comments