2017-07-31 08:04:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\Forms\HTMLEditor;
|
|
|
|
|
|
|
|
use Exception;
|
2017-10-04 05:08:33 +02:00
|
|
|
use SilverStripe\Control\Controller;
|
2017-07-31 08:04:20 +02:00
|
|
|
use SilverStripe\Core\Injector\Injectable;
|
|
|
|
use SilverStripe\Dev\Deprecation;
|
|
|
|
use TinyMCE_Compressor;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Uses the default tiny_mc_gzip.php handler
|
|
|
|
*
|
2018-09-28 10:46:36 +02:00
|
|
|
* @deprecated 4.0.0:5.0.0
|
2017-07-31 08:04:20 +02:00
|
|
|
*/
|
|
|
|
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)
|
|
|
|
{
|
2019-06-20 23:27:48 +02:00
|
|
|
return Controller::join_links($config->getTinyMCEResourceURL(), 'tinymce.min.js');
|
2017-07-31 08:04:20 +02:00
|
|
|
}
|
|
|
|
}
|