Skip to content

Commit abca375

Browse files
author
Robert He
committed
MAGETWO-89659: Address comments / feedback from review
- fix bugs and stylings
1 parent 8e36dec commit abca375

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

app/code/Magento/Ui/Component/Form/Element/ColorPicker.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Magento\Ui\Component\Form\Element;
1010

11-
use Magento\Ui\Component\Form\Field;
11+
use Magento\Ui\Model\ColorPicker\ColorModesProvider;
1212
use Magento\Framework\View\Element\UiComponentFactory;
1313
use Magento\Framework\View\Element\UiComponentInterface;
1414
use Magento\Framework\View\Element\UiComponent\ContextInterface;
@@ -24,17 +24,25 @@ class ColorPicker extends AbstractElement
2424

2525
const DEFAULT_MODE = 'full';
2626

27+
/**
28+
* Provides color picker modes configuration
29+
*
30+
* @var ColorModesProvider
31+
*/
32+
private $modeProvider;
33+
2734
/**
2835
* Constructor
2936
*
3037
* @param ContextInterface $context
38+
* @param ColorModesProvider $modesProvider
3139
* @param UiComponentFactory $uiComponentFactory
3240
* @param UiComponentInterface[] $components
3341
* @param array $data
3442
*/
3543
public function __construct(
36-
\Magento\Ui\Model\ColorPicker\ColorModesProvider $modesProvider,
3744
ContextInterface $context,
45+
ColorModesProvider $modesProvider,
3846
array $components = [],
3947
array $data = []
4048
) {
@@ -67,6 +75,5 @@ public function prepare()
6775
$this->_data['config']['colorPickerConfig'] = $colorPickerMode;
6876

6977
parent::prepare();
70-
7178
}
7279
}

app/code/Magento/Ui/Model/ColorPicker/ColorModesProvider.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,18 @@
1313
*/
1414
class ColorModesProvider
1515
{
16+
/**
17+
* Stores color picker modes configuration
18+
*
19+
* @var array
20+
*/
1621
private $colorModes;
1722

23+
/**
24+
* Magento object manager
25+
*
26+
* @var \Magento\Framework\ObjectManagerInterface
27+
*/
1828
private $objectManager;
1929

2030
public function __construct(

0 commit comments

Comments
 (0)