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
+ use Magento \Store \Model \ StoreManagerInterface ;
10
10
11
11
/**
12
12
* Directory data processor.
@@ -37,9 +37,9 @@ class DirectoryDataProcessor implements \Magento\Checkout\Block\Checkout\LayoutP
37
37
private $ countryCollectionFactory ;
38
38
39
39
/**
40
- * @var StoreResolverInterface
40
+ * @var StoreManagerInterface
41
41
*/
42
- private $ storeResolver ;
42
+ private $ storeManager ;
43
43
44
44
/**
45
45
* @var DirectoryHelper
@@ -49,18 +49,18 @@ class DirectoryDataProcessor implements \Magento\Checkout\Block\Checkout\LayoutP
49
49
/**
50
50
* @param \Magento\Directory\Model\ResourceModel\Country\CollectionFactory $countryCollection
51
51
* @param \Magento\Directory\Model\ResourceModel\Region\CollectionFactory $regionCollection
52
- * @param StoreResolverInterface $storeResolver
52
+ * @param StoreManagerInterface $storeManager
53
53
* @param DirectoryHelper $directoryHelper
54
54
*/
55
55
public function __construct (
56
56
\Magento \Directory \Model \ResourceModel \Country \CollectionFactory $ countryCollection ,
57
57
\Magento \Directory \Model \ResourceModel \Region \CollectionFactory $ regionCollection ,
58
- StoreResolverInterface $ storeResolver ,
58
+ StoreManagerInterface $ storeManager ,
59
59
DirectoryHelper $ directoryHelper
60
60
) {
61
61
$ this ->countryCollectionFactory = $ countryCollection ;
62
62
$ this ->regionCollectionFactory = $ regionCollection ;
63
- $ this ->storeResolver = $ storeResolver ;
63
+ $ this ->storeManager = $ storeManager ;
64
64
$ this ->directoryHelper = $ directoryHelper ;
65
65
}
66
66
@@ -91,7 +91,7 @@ private function getCountryOptions()
91
91
{
92
92
if (!isset ($ this ->countryOptions )) {
93
93
$ this ->countryOptions = $ this ->countryCollectionFactory ->create ()->loadByStore (
94
- $ this ->storeResolver -> getCurrentStoreId ()
94
+ $ this ->storeManager -> getStore ()-> getId ()
95
95
)->toOptionArray ();
96
96
$ this ->countryOptions = $ this ->orderCountryOptions ($ this ->countryOptions );
97
97
}
@@ -108,7 +108,7 @@ private function getRegionOptions()
108
108
{
109
109
if (!isset ($ this ->regionOptions )) {
110
110
$ this ->regionOptions = $ this ->regionCollectionFactory ->create ()->addAllowedCountriesFilter (
111
- $ this ->storeResolver -> getCurrentStoreId ()
111
+ $ this ->storeManager -> getStore ()-> getId ()
112
112
)->toOptionArray ();
113
113
}
114
114
0 commit comments