File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
namespace Magento \Ui \Component \Form \Element ;
10
10
11
- use Magento \Ui \Component \ Form \ Field ;
11
+ use Magento \Ui \Model \ ColorPicker \ ColorModesProvider ;
12
12
use Magento \Framework \View \Element \UiComponentFactory ;
13
13
use Magento \Framework \View \Element \UiComponentInterface ;
14
14
use Magento \Framework \View \Element \UiComponent \ContextInterface ;
@@ -24,17 +24,25 @@ class ColorPicker extends AbstractElement
24
24
25
25
const DEFAULT_MODE = 'full ' ;
26
26
27
+ /**
28
+ * Provides color picker modes configuration
29
+ *
30
+ * @var ColorModesProvider
31
+ */
32
+ private $ modeProvider ;
33
+
27
34
/**
28
35
* Constructor
29
36
*
30
37
* @param ContextInterface $context
38
+ * @param ColorModesProvider $modesProvider
31
39
* @param UiComponentFactory $uiComponentFactory
32
40
* @param UiComponentInterface[] $components
33
41
* @param array $data
34
42
*/
35
43
public function __construct (
36
- \Magento \Ui \Model \ColorPicker \ColorModesProvider $ modesProvider ,
37
44
ContextInterface $ context ,
45
+ ColorModesProvider $ modesProvider ,
38
46
array $ components = [],
39
47
array $ data = []
40
48
) {
@@ -67,6 +75,5 @@ public function prepare()
67
75
$ this ->_data ['config ' ]['colorPickerConfig ' ] = $ colorPickerMode ;
68
76
69
77
parent ::prepare ();
70
-
71
78
}
72
79
}
Original file line number Diff line number Diff line change 13
13
*/
14
14
class ColorModesProvider
15
15
{
16
+ /**
17
+ * Stores color picker modes configuration
18
+ *
19
+ * @var array
20
+ */
16
21
private $ colorModes ;
17
22
23
+ /**
24
+ * Magento object manager
25
+ *
26
+ * @var \Magento\Framework\ObjectManagerInterface
27
+ */
18
28
private $ objectManager ;
19
29
20
30
public function __construct (
You can’t perform that action at this time.
0 commit comments