114 private $configProvider;
133 \
Magento\Backend\Model\UrlInterface $backendUrl,
134 \
Magento\Framework\Event\ManagerInterface $eventManager,
135 \
Magento\Framework\AuthorizationInterface $authorization,
136 \
Magento\Framework\View\Asset\Repository $assetRepo,
142 array $windowSize = [],
146 $this->_backendUrl = $backendUrl;
147 $this->_eventManager = $eventManager;
148 $this->_scopeConfig = $scopeConfig;
149 $this->_authorization = $authorization;
150 $this->_assetRepo = $assetRepo;
151 $this->_variableConfig = $variableConfig;
152 $this->_widgetConfig = $widgetConfig;
153 $this->_windowSize = $windowSize;
157 ->get(\
Magento\Cms\Model\Wysiwyg\CompositeConfigProvider ::class);
158 parent::__construct(
$data);
179 $config = new \Magento\Framework\DataObject();
185 'baseStaticUrl' => $this->_assetRepo->getStaticViewFileContext()->getBaseUrl(),
186 'baseStaticDefaultUrl' => str_replace(
'index.php/',
'', $this->_backendUrl->getBaseUrl())
188 'directives_url' => $this->_backendUrl->getUrl(
'cms/wysiwyg/directive'),
189 'use_container' =>
false,
190 'add_variables' =>
true,
191 'add_widgets' =>
true,
192 'no_display' =>
false,
193 'add_directives' =>
true,
200 $config->setData(
'directives_url_quoted', preg_quote(
$config->getData(
'directives_url')));
202 if (is_array(
$data)) {
206 if ($this->_authorization->isAllowed(
'Magento_Cms::media_gallery')) {
207 $this->configProvider->processGalleryConfig(
$config);
210 'files_browser_window_width' => $this->_windowSize[
'width'],
211 'files_browser_window_height' => $this->_windowSize[
'height'],
215 if (
$config->getData(
'add_widgets')) {
216 $this->configProvider->processWidgetConfig(
$config);
219 if (
$config->getData(
'add_variables')) {
220 $this->configProvider->processVariableConfig(
$config);
223 return $this->configProvider->processWysiwygConfig(
$config);
233 $staticPath = $this->_storeManager->getStore()->getBaseStaticDir();
234 $placeholderPath = $this->_assetRepo->createAsset(self::WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID)->getPath();
235 return $staticPath .
'/' . $placeholderPath;
245 $wysiwygState = $this->_scopeConfig->getValue(
246 self::WYSIWYG_STATUS_CONFIG_PATH,
250 return in_array($wysiwygState, [self::WYSIWYG_ENABLED, self::WYSIWYG_HIDDEN]);
260 $status = $this->_scopeConfig->getValue(
261 self::WYSIWYG_STATUS_CONFIG_PATH,
const WYSIWYG_STATUS_CONFIG_PATH
getSkinImagePlaceholderPath()
__construct(\Magento\Backend\Model\UrlInterface $backendUrl, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\AuthorizationInterface $authorization, \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Variable\Model\Variable\Config $variableConfig, \Magento\Widget\Model\Widget\Config $widgetConfig, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, Filesystem $filesystem, array $windowSize=[], array $data=[], \Magento\Cms\Model\Wysiwyg\CompositeConfigProvider $configProvider=null)
const WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID