@@ -20,6 +20,11 @@ class Config extends \Magento\Framework\Object
20
20
*/
21
21
const WYSIWYG_STATUS_CONFIG_PATH = 'cms/wysiwyg/enabled ' ;
22
22
23
+ /**
24
+ *
25
+ */
26
+ const WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID = 'Magento_Cms::images/wysiwyg_skin_image.png ' ;
27
+
23
28
/**
24
29
* Wysiwyg status hidden
25
30
*/
@@ -79,6 +84,11 @@ class Config extends \Magento\Framework\Object
79
84
*/
80
85
protected $ _backendUrl ;
81
86
87
+ /**
88
+ * @var \Magento\Store\Model\StoreManagerInterface
89
+ */
90
+ protected $ _storeManager ;
91
+
82
92
/**
83
93
* @param \Magento\Backend\Model\UrlInterface $backendUrl
84
94
* @param \Magento\Framework\Event\ManagerInterface $eventManager
@@ -87,6 +97,7 @@ class Config extends \Magento\Framework\Object
87
97
* @param \Magento\Core\Model\Variable\Config $variableConfig
88
98
* @param \Magento\Widget\Model\Widget\Config $widgetConfig
89
99
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
100
+ * @param \Magento\Store\Model\StoreManagerInterface $storeManager
90
101
* @param array $windowSize
91
102
* @param array $data
92
103
*/
@@ -98,6 +109,7 @@ public function __construct(
98
109
\Magento \Core \Model \Variable \Config $ variableConfig ,
99
110
\Magento \Widget \Model \Widget \Config $ widgetConfig ,
100
111
\Magento \Framework \App \Config \ScopeConfigInterface $ scopeConfig ,
112
+ \Magento \Store \Model \StoreManagerInterface $ storeManager ,
101
113
array $ windowSize = [],
102
114
array $ data = []
103
115
) {
@@ -109,6 +121,7 @@ public function __construct(
109
121
$ this ->_variableConfig = $ variableConfig ;
110
122
$ this ->_widgetConfig = $ widgetConfig ;
111
123
$ this ->_windowSize = $ windowSize ;
124
+ $ this ->_storeManager = $ storeManager ;
112
125
parent ::__construct ($ data );
113
126
}
114
127
@@ -184,13 +197,15 @@ public function getConfig($data = [])
184
197
}
185
198
186
199
/**
187
- * Return URL for skin images placeholder
200
+ * Return path for skin images placeholder
188
201
*
189
202
* @return string
190
203
*/
191
- public function getSkinImagePlaceholderUrl ()
204
+ public function getSkinImagePlaceholderPath ()
192
205
{
193
- return $ this ->_assetRepo ->getUrl ('Magento_Cms::images/wysiwyg_skin_image.png ' );
206
+ $ staticPath = $ this ->_storeManager ->getStore ()->getBaseStaticDir ();
207
+ $ placeholderPath = $ this ->_assetRepo ->createAsset (self ::WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID )->getPath ();
208
+ return $ staticPath . '/ ' . $ placeholderPath ;
194
209
}
195
210
196
211
/**
0 commit comments