37
37
use Magento \Variable \Model \VariableFactory ;
38
38
use Psr \Log \LoggerInterface ;
39
39
use Magento \Store \Model \Information as StoreInformation ;
40
+ use \Magento \Framework \App \ObjectManager ;
40
41
41
42
/**
42
43
* Core Email Template Filter Model
@@ -250,7 +251,7 @@ public function __construct(
250
251
CssInliner $ cssInliner ,
251
252
$ variables = [],
252
253
array $ directiveProcessors = [],
253
- StoreInformation $ storeInformation = null
254
+ ? StoreInformation $ storeInformation = null
254
255
) {
255
256
$ this ->_escaper = $ escaper ;
256
257
$ this ->_assetRepo = $ assetRepo ;
@@ -268,7 +269,7 @@ public function __construct(
268
269
$ this ->pubDirectory = $ pubDirectory ;
269
270
$ this ->configVariables = $ configVariables ;
270
271
$ this ->storeInformation = $ storeInformation ?:
271
- \ Magento \ Framework \ App \ ObjectManager::getInstance ()->get (StoreInformation::class);
272
+ ObjectManager::getInstance ()->get (StoreInformation::class);
272
273
parent ::__construct ($ string , $ variables , $ directiveProcessors , $ variableResolver );
273
274
}
274
275
@@ -851,9 +852,9 @@ public function configDirective($construction)
851
852
ScopeInterface::SCOPE_STORE ,
852
853
$ storeId
853
854
);
854
- if ($ params ['path ' ] == " general/store_information/country_id " ) {
855
+ if ($ params ['path ' ] == $ this -> storeInformation :: XML_PATH_STORE_INFO_COUNTRY_CODE ) {
855
856
$ configValue = $ storeInformationObj ->getData ('country ' );
856
- } elseif ($ params ['path ' ] == " general/store_information/region_id " ) {
857
+ } elseif ($ params ['path ' ] == $ this -> storeInformation :: XML_PATH_STORE_INFO_REGION_CODE ) {
857
858
$ configValue = $ storeInformationObj ->getData ('region ' )?
858
859
$ storeInformationObj ->getData ('region ' ):
859
860
$ configValue ;
0 commit comments