File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
app/code/Magento/Ui/Component/Form/Element/DataType/Media Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 8
8
9
9
namespace Magento \Ui \Component \Form \Element \DataType \Media ;
10
10
11
+ use Magento \Framework \DataObject ;
12
+
11
13
/**
12
14
* Basic configuration for OdenDialogUrl
13
15
*/
@@ -21,11 +23,11 @@ class OpenDialogUrl
21
23
private $ openDialogUrl ;
22
24
23
25
/**
24
- * @param string $url
26
+ * @param DataObject $url
25
27
*/
26
- public function __construct (string $ url = null )
28
+ public function __construct (DataObject $ url = null )
27
29
{
28
- $ this ->openDialogUrl = $ url ?? self :: DEFAULT_OPEN_DIALOG_URL ;
30
+ $ this ->openDialogUrl = $ url ;
29
31
}
30
32
31
33
/**
@@ -35,6 +37,9 @@ public function __construct(string $url = null)
35
37
*/
36
38
public function get (): string
37
39
{
38
- return $ this ->openDialogUrl ;
40
+ if ($ this ->openDialogUrl ) {
41
+ return $ this ->openDialogUrl ->getUrl ();
42
+ }
43
+ return self ::DEFAULT_OPEN_DIALOG_URL ;
39
44
}
40
45
}
You can’t perform that action at this time.
0 commit comments