File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
app/code/Magento/Widget/Block/Adminhtml Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 15
15
class Widget extends \Magento \Backend \Block \Widget \Form \Container
16
16
{
17
17
/**
18
- * @return void
18
+ * @inheritdoc
19
+ *
20
+ * @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
19
21
*/
20
22
protected function _construct ()
21
23
{
@@ -40,13 +42,16 @@ protected function _construct()
40
42
$ this ->buttonList ->update ('reset ' , 'label ' , __ ('Cancel ' ));
41
43
$ this ->buttonList ->update ('reset ' , 'onclick ' , 'wWidget.closeModal() ' );
42
44
43
- $ this ->_formScripts [] = 'require(["mage/adminhtml/wysiwyg/widget"], '
44
- . ' function(){wWidget = new WysiwygWidget.Widget( '
45
- . '"widget_options_form", "select_widget_type", "widget_options", " '
46
- . $ this ->getUrl (
47
- 'adminhtml/*/loadOptions '
48
- ) . '", " ' . $ this ->getRequest ()->getParam (
49
- 'widget_target_id '
50
- ) . '");}); ' ;
45
+ $ this ->_formScripts [] = <<<EOJS
46
+ require(['mage/adminhtml/wysiwyg/widget'], function() {
47
+ wWidget = new WysiwygWidget.Widget(
48
+ 'widget_options_form',
49
+ 'select_widget_type',
50
+ 'widget_options',
51
+ ' {$ this ->getUrl ('adminhtml/*/loadOptions ' )}',
52
+ ' {$ this ->escapeJs ($ this ->getRequest ()->getParam ('widget_target_id ' ))}'
53
+ );
54
+ });
55
+ EOJS ;
51
56
}
52
57
}
You can’t perform that action at this time.
0 commit comments