File tree Expand file tree Collapse file tree 6 files changed +7598
-9
lines changed
app/code/Magento/PageBuilder
Block/Adminhtml/Html/Head
ts/js/content-type/wysiwyg Expand file tree Collapse file tree 6 files changed +7598
-9
lines changed Original file line number Diff line number Diff line change 17
17
*/
18
18
class BabelPolyfill extends Template
19
19
{
20
+ /**
21
+ * @var \Magento\PageBuilder\Model\ConfigInterface
22
+ */
23
+ private $ config ;
24
+
25
+ /**
26
+ * @param Template\Context $context
27
+ * @param \Magento\PageBuilder\Model\ConfigInterface $config
28
+ * @param array $data
29
+ */
30
+ public function __construct (
31
+ Template \Context $ context ,
32
+ \Magento \PageBuilder \Model \ConfigInterface $ config ,
33
+ array $ data = []
34
+ ) {
35
+ $ this ->config = $ config ;
36
+ parent ::__construct ($ context , $ data );
37
+ }
38
+
20
39
/**
21
40
* Detect if Page Builder is enabled before loading the polyfill
22
41
*
23
42
* @return bool
24
43
*/
25
44
public function shouldLoadPolyfill () : bool
26
45
{
27
- return (bool )$ this ->_scopeConfig ->getValue (
28
- \Magento \PageBuilder \Model \Config::IS_PAGEBUILDER_ENABLED
29
- );
46
+ return $ this ->config ->isEnabled ();
30
47
}
31
48
32
49
/**
@@ -36,6 +53,6 @@ public function shouldLoadPolyfill() : bool
36
53
*/
37
54
public function getJsUrl () : string
38
55
{
39
- return $ this ->_assetRepo ->getUrl ("Magento_PageBuilder::js/babel/polyfill.min.js " );
56
+ return $ this ->_assetRepo ->getUrl ("Magento_PageBuilder::js/resource/ babel/polyfill.min.js " );
40
57
}
41
58
}
Original file line number Diff line number Diff line change 8
8
<page xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" layout =" admin-1column" xsi : noNamespaceSchemaLocation =" urn:magento:framework:View/Layout/etc/page_configuration.xsd" >
9
9
<body >
10
10
<block class =" Magento\Framework\View\Element\Template" name =" head.additional" as =" head.additional" template =" Magento_PageBuilder::html/container.phtml" >
11
- <block class =" Magento\PageBuilder\Block\Adminhtml\Html\Head\BabelPolyfill" name =" pagebuilder.babel.polyfill" as =" pagebuilder.babel.polyfill" template =" Magento_PageBuilder::head/babel-polyfill .phtml" />
11
+ <block class =" Magento\PageBuilder\Block\Adminhtml\Html\Head\BabelPolyfill" name =" pagebuilder.babel.polyfill" as =" pagebuilder.babel.polyfill" template =" Magento_PageBuilder::html/ head/babel_polyfill .phtml" />
12
12
</block >
13
13
<referenceContainer name =" before.body.end" >
14
14
<uiComponent name =" pagebuilder_modal_form" />
File renamed without changes.
You can’t perform that action at this time.
0 commit comments