File tree 1 file changed +12
-2
lines changed
app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -26,20 +26,30 @@ class Tree extends \Magento\Backend\Block\Template
26
26
*/
27
27
protected $ _cmsWysiwygImages = null ;
28
28
29
+ /**
30
+ * @var \Magento\Framework\Serialize\Serializer\Json
31
+ */
32
+ private $ serializer ;
33
+
29
34
/**
30
35
* @param \Magento\Backend\Block\Template\Context $context
31
36
* @param \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages
32
37
* @param \Magento\Framework\Registry $registry
33
38
* @param array $data
39
+ * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
40
+ * @throws \RuntimeException
34
41
*/
35
42
public function __construct (
36
43
\Magento \Backend \Block \Template \Context $ context ,
37
44
\Magento \Cms \Helper \Wysiwyg \Images $ cmsWysiwygImages ,
38
45
\Magento \Framework \Registry $ registry ,
39
- array $ data = []
46
+ array $ data = [],
47
+ \Magento \Framework \Serialize \Serializer \Json $ serializer = null
40
48
) {
41
49
$ this ->_coreRegistry = $ registry ;
42
50
$ this ->_cmsWysiwygImages = $ cmsWysiwygImages ;
51
+ $ this ->serializer = $ serializer ?: \Magento \Framework \App \ObjectManager::getInstance ()
52
+ ->get (\Magento \Framework \Serialize \Serializer \Json::class);
43
53
parent ::__construct ($ context , $ data );
44
54
}
45
55
@@ -65,7 +75,7 @@ public function getTreeJson()
65
75
'cls ' => 'folder ' ,
66
76
];
67
77
}
68
- return \Zend_Json:: encode ($ jsonArray );
78
+ return $ this -> serializer -> serialize ($ jsonArray );
69
79
}
70
80
71
81
/**
You can’t perform that action at this time.
0 commit comments