Skip to content

Commit 1c8579a

Browse files
committed
Merge remote-tracking branch 'remotes/origin/MAGETWO-89695-tinymce3' into team3-delivery
2 parents fb4294a + 33a41ff commit 1c8579a

File tree

28 files changed

+268
-29
lines changed

28 files changed

+268
-29
lines changed

app/code/Magento/Cms/Model/Wysiwyg/DefaultConfigProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
declare(strict_types=1);
8+
79
namespace Magento\Cms\Model\Wysiwyg;
810

911
/**
@@ -27,7 +29,7 @@ public function __construct(\Magento\Framework\View\Asset\Repository $assetRepo)
2729
/**
2830
* {@inheritdoc}
2931
*/
30-
public function getConfig($config)
32+
public function getConfig(\Magento\Framework\DataObject $config) : \Magento\Framework\DataObject
3133
{
3234
$config->addData([
3335
'tinymce4' => [

app/code/Magento/Cms/Model/Wysiwyg/Gallery/DefaultConfigProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
declare(strict_types=1);
8+
79
namespace Magento\Cms\Model\Wysiwyg\Gallery;
810

911
class DefaultConfigProvider implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
@@ -49,7 +51,7 @@ public function __construct(
4951
/**
5052
* {@inheritdoc}
5153
*/
52-
public function getConfig($config)
54+
public function getConfig(\Magento\Framework\DataObject $config) : \Magento\Framework\DataObject
5355
{
5456
$pluginData = (array) $config->getData('plugins');
5557
$imageData = [

app/code/Magento/Cms/Model/WysiwygDefaultConfig.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Cms\Model;
79

810
class WysiwygDefaultConfig implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
911
{
1012
/**
1113
* {@inheritdoc}
1214
*/
13-
public function getConfig($config)
15+
public function getConfig(\Magento\Framework\DataObject $config) : \Magento\Framework\DataObject
1416
{
1517
return $config;
1618
}

app/code/Magento/Tinymce3/Model/Config/Source/Wysiwyg/Editor.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Tinymce3\Model\Config\Source\Wysiwyg;
79

10+
/**
11+
* Class Editor provides configuration value for TinyMCE3 editor
12+
* @deprecated use as configuration value tinymce4 path: mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter
13+
*/
814
class Editor
915
{
1016
/**

app/code/Magento/Tinymce3/Model/Config/Variable/Config.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
68
namespace Magento\Tinymce3\Model\Config\Variable;
79

810
/**
911
* Class Config adds variable plugin information required for tinymce3 editor
12+
* @deprecated use \Magento\Variable\Model\Variable\ConfigProvider instead
1013
*/
1114
class Config implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
1215
{
@@ -38,7 +41,7 @@ public function __construct(
3841
* @param \Magento\Framework\DataObject $config
3942
* @return \Magento\Framework\DataObject
4043
*/
41-
public function getConfig($config)
44+
public function getConfig(\Magento\Framework\DataObject $config) : \Magento\Framework\DataObject
4245
{
4346
$settings = $this->defaultVariableConfig->getWysiwygPluginSettings($config);
4447
$pluginConfig = isset($settings['plugins']) ? $settings['plugins'] : [];

app/code/Magento/Tinymce3/Model/Config/Widget/Config.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Tinymce3\Model\Config\Widget;
79

810
/**
911
* Class Config adds widget plugin information required for tinymce3 editor
12+
* @deprecated use \Magento\Widget\Model\Widget\Config instead
1013
*/
1114
class Config implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
1215
{
@@ -35,7 +38,7 @@ public function __construct(
3538
/**
3639
* {@inheritdoc}
3740
*/
38-
public function getConfig($config)
41+
public function getConfig(\Magento\Framework\DataObject $config) : \Magento\Framework\DataObject
3942
{
4043
$settings = [
4144
'widget_plugin_src' => $this->getWysiwygJsPluginSrc(),
@@ -52,7 +55,7 @@ public function getConfig($config)
5255
*
5356
* @return string
5457
*/
55-
private function getWysiwygJsPluginSrc()
58+
private function getWysiwygJsPluginSrc() : string
5659
{
5760
$editorPluginJs = 'Magento_Tinymce3::tiny_mce/plugins/magentowidget/editor_plugin.js';
5861
$result = $this->assetRepo->getUrl($editorPluginJs);

app/code/Magento/Tinymce3/Model/Config/Widget/PlaceholderImagesPool.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
6+
declare(strict_types=1);
77
namespace Magento\Tinymce3\Model\Config\Widget;
88

99
/**
1010
* Class PlaceholderImages provide ability to override placeholder images for Widgets
11+
* @deprecated
1112
*/
1213
class PlaceholderImagesPool
1314
{
@@ -29,7 +30,7 @@ public function __construct(
2930
/**
3031
* @return array
3132
*/
32-
public function getWidgetPlaceholders()
33+
public function getWidgetPlaceholders() : array
3334
{
3435
return $this->widgetPlaceholders;
3536
}

app/code/Magento/Tinymce3/Model/Config/Wysiwyg/Config.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Tinymce3\Model\Config\Wysiwyg;
79

810
/**
911
* Class Config adds information about required css files for tinymce3 editor
12+
* @deprecated use \Magento\Cms\Model\Wysiwyg\DefaultConfigProvider instead
1013
*/
1114
class Config implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
1215
{
@@ -27,7 +30,7 @@ public function __construct(
2730
/**
2831
* {@inheritdoc}
2932
*/
30-
public function getConfig($config)
33+
public function getConfig(\Magento\Framework\DataObject $config) : \Magento\Framework\DataObject
3134
{
3235
$config->addData([
3336
'popup_css' => $this->assetRepo->getUrl(

app/code/Magento/Tinymce3/Model/Plugin/Widget.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
declare(strict_types=1);
68
namespace Magento\Tinymce3\Model\Plugin;
79

810
use Magento\Tinymce3\Model\Config\Source\Wysiwyg\Editor;
@@ -44,16 +46,16 @@ public function __construct(
4446

4547
/**
4648
* @param \Magento\Widget\Model\Widget $subject
47-
* @param $proceed
48-
* @param $type
49+
* @param \Closure $proceed
50+
* @param string $type
4951
* @return string
5052
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
5153
*/
5254
public function aroundGetPlaceholderImageUrl(
5355
\Magento\Widget\Model\Widget $subject,
54-
$proceed,
55-
$type
56-
) {
56+
\Closure $proceed,
57+
string $type
58+
) : string {
5759
if ($this->activeEditor->getWysiwygAdapterPath() !== Editor::WYSIWYG_EDITOR_CONFIG_VALUE) {
5860
return $proceed($type);
5961
}

app/code/Magento/Tinymce3/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
This moodule provides backwards compatibility for TinyMCE3 for clients
2-
that have modified the TinyMCE3 editor in Magento and don't want to
3-
lose functionality.
1+
We have updated the TinyMCE module to the latest available version, 4.6.4. TinyMCE v4.6.4 provides backwards-compatibility for modified editor modules to prevent the loss of functionality. The TinyMCE3 module is now deprecated and will be removed in a future release.

0 commit comments

Comments
 (0)