7 declare(strict_types=1);
21 private $imagesHelper;
31 private $currentTreePath;
40 \
Magento\Backend\Model\UrlInterface $backendUrl,
41 \
Magento\Cms\Helper\Wysiwyg\Images $imagesHelper,
42 array $windowSize = [],
43 $currentTreePath =
null 45 $this->backendUrl = $backendUrl;
46 $this->imagesHelper = $imagesHelper;
47 $this->windowSize = $windowSize;
48 $this->currentTreePath = $currentTreePath;
56 $pluginData = (array)
$config->getData(
'plugins');
63 $fileBrowserUrlParams = [];
65 if (is_string($this->currentTreePath)) {
66 $fileBrowserUrlParams = [
67 'current_tree_path' => $this->imagesHelper->idEncode($this->currentTreePath),
74 'files_browser_window_url' => $this->backendUrl->getUrl(
75 'cms/wysiwyg_images/index',
78 'files_browser_window_width' => $this->windowSize[
'width'],
79 'files_browser_window_height' => $this->windowSize[
'height'],
80 'plugins' => array_merge($pluginData, $imageData)
getConfig(\Magento\Framework\DataObject $config)
__construct(\Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Cms\Helper\Wysiwyg\Images $imagesHelper, array $windowSize=[], $currentTreePath=null)