silverstripe-framework/src/Forms/HTMLEditor/TinyMCEGZIPGenerator.php
Saophalkun Ponlu 6a8c6703d1 Remove use_gzip from HTMLEditorField since it's been removed by TinyMCE codebase (#7261)
* Remove `use_gzip` from HTMLEditorField

* DOCS Mention remove use_gzip in changelog
2019-06-21 09:27:48 +12:00

37 lines
819 B
PHP

<?php
namespace SilverStripe\Forms\HTMLEditor;
use Exception;
use SilverStripe\Control\Controller;
use SilverStripe\Core\Injector\Injectable;
use SilverStripe\Dev\Deprecation;
use TinyMCE_Compressor;
/**
* Uses the default tiny_mc_gzip.php handler
*
* @deprecated 4.0.0:5.0.0
*/
class TinyMCEGZIPGenerator implements TinyMCEScriptGenerator
{
use Injectable;
public function __construct()
{
Deprecation::notice('5.0', 'Legacy tiny_mce_gzip compressor is deprecated');
}
/**
* Generate a script URL for the given config
*
* @param TinyMCEConfig $config
* @return string
* @throws Exception
*/
public function getScriptURL(TinyMCEConfig $config)
{
return Controller::join_links($config->getTinyMCEResourceURL(), 'tinymce.min.js');
}
}