7
7
8
8
namespace Magento \Sales \Ui \Component \Listing \Column ;
9
9
10
+ use Magento \Framework \App \ObjectManager ;
10
11
use Magento \Framework \View \Element \UiComponent \ContextInterface ;
11
12
use Magento \Framework \View \Element \UiComponentFactory ;
12
13
use Magento \Store \Model \StoreManagerInterface ;
@@ -45,7 +46,7 @@ class Price extends Column
45
46
* @param array $components
46
47
* @param array $data
47
48
* @param Currency $currency
48
- * @param StoreManagerInterface|null $storeManager
49
+ * @param StoreManagerInterface $storeManager
49
50
*/
50
51
public function __construct (
51
52
ContextInterface $ context ,
@@ -57,10 +58,10 @@ public function __construct(
57
58
StoreManagerInterface $ storeManager = null
58
59
) {
59
60
$ this ->priceFormatter = $ priceFormatter ;
60
- $ this ->currency = $ currency ?: \ Magento \ Framework \ App \ ObjectManager::getInstance ()
61
- ->create (Currency::class);
62
- $ this ->storeManager = $ storeManager ?: \ Magento \ Framework \ App \ ObjectManager::getInstance ()
63
- ->create (StoreManagerInterface::class);
61
+ $ this ->currency = $ currency ?: ObjectManager::getInstance ()
62
+ ->get (Currency::class);
63
+ $ this ->storeManager = $ storeManager ?: ObjectManager::getInstance ()
64
+ ->get (StoreManagerInterface::class);
64
65
parent ::__construct ($ context , $ uiComponentFactory , $ components , $ data );
65
66
}
66
67
0 commit comments