File tree Expand file tree Collapse file tree 3 files changed +22
-54
lines changed
app/code/Magento/PageBuilder
Model/Config/ContentType/AdditionalData/Provider/Uploader Expand file tree Collapse file tree 3 files changed +22
-54
lines changed Original file line number Diff line number Diff line change 9
9
namespace Magento \PageBuilder \Model \Config \ContentType \AdditionalData \Provider \Uploader ;
10
10
11
11
use Magento \PageBuilder \Model \Config \ContentType \AdditionalData \ProviderInterface ;
12
- use Magento \Framework \ FlagManager ;
12
+ use Magento \Backend \ Model \ Url ;
13
13
14
14
/**
15
15
* Provides open dialog URL for media gallery slideout
16
16
*/
17
17
class OpenDialogUrl implements ProviderInterface
18
18
{
19
- private const MEDIA_GALLERY_OPEN_URL = 'open_dialog_url ' ;
20
-
21
19
/**
22
- * @var FlagManager
20
+ * @var Url
23
21
*/
24
- private $ flagManager ;
22
+ private $ urlBuilder ;
25
23
26
24
/**
27
- * @param FlagManager $flagManager
25
+ * @var string
28
26
*/
29
- public function __construct (FlagManager $ flagManager )
30
- {
31
- $ this ->flagManager = $ flagManager ;
27
+ private $ openDialogPath ;
28
+
29
+ /**
30
+ * @param Url $urlBuilder
31
+ * @param string $openDialogPath
32
+ */
33
+ public function __construct (
34
+ Url $ urlBuilder ,
35
+ string $ openDialogPath
36
+ ) {
37
+ $ this ->urlBuilder = $ urlBuilder ;
38
+ $ this ->openDialogPath = $ openDialogPath ;
32
39
}
33
40
34
41
/**
@@ -37,7 +44,7 @@ public function __construct(FlagManager $flagManager)
37
44
public function getData (string $ itemName ) : array
38
45
{
39
46
return [
40
- $ itemName => $ this ->flagManager -> getFlagData ( self :: MEDIA_GALLERY_OPEN_URL )
47
+ $ itemName => $ this ->urlBuilder -> getUrl ( $ this -> openDialogPath , [ ' _secure ' => true ] )
41
48
];
42
49
}
43
50
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 12
12
<type name =" Magento\Catalog\Block\Product\ImageFactory" >
13
13
<plugin name =" designLoader" type =" Magento\PageBuilder\Plugin\DesignLoader" />
14
14
</type >
15
+ <type name =" Magento\PageBuilder\Model\Config\ContentType\AdditionalData\Provider\Uploader\OpenDialogUrl" >
16
+ <arguments >
17
+ <argument name =" openDialogPath" xsi : type =" string" >cms/wysiwyg_images/index</argument >
18
+ </arguments >
19
+ </type >
15
20
<type name =" Magento\Ui\Component\Form\Element\DataType\Media\Image" >
16
21
<plugin name =" setOpenDialogUrl" type =" Magento\PageBuilder\Plugin\SetOpenDialogUrl" />
17
22
</type >
You can’t perform that action at this time.
0 commit comments