change namespace

This commit is contained in:
O3-Shop 2023-04-02 23:49:41 +02:00
parent de545f7a29
commit db0e810653
7 changed files with 28 additions and 27 deletions

View File

@ -19,7 +19,9 @@
* @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3)
*/
namespace VanillaThunder\TinyMCE\Application\Core;
namespace O3\TinyMCE\Application\Core {
use OxidEsales\Eshop\Core\ViewConfig;
class_alias(\OxidEsales\EshopCommunity\Core\ViewConfig::class,"VanillaThunder\TinyMCE\Application\Core\ViewConfig_parent");
class ViewConfig_parent extends ViewConfig {}
}

View File

@ -19,11 +19,11 @@
* @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3)
*/
namespace VanillaThunder\TinyMCE\Application\Controller\Admin;
namespace O3\TinyMCE\Application\Controller\Admin;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Application\Controller\Admin\AdminController;
class TinyFileManager extends \OxidEsales\Eshop\Application\Controller\Admin\AdminController
class TinyFileManager extends AdminController
{
protected $_sThisTemplate = "tiny/filemanager.tpl";

View File

@ -19,10 +19,12 @@
* @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3)
*/
namespace VanillaThunder\TinyMCE\Application\Controller\Admin;
namespace O3\TinyMCE\Application\Controller\Admin;
use OxidEsales\Eshop\Application\Controller\Admin\AdminController;
use OxidEsales\Eshop\Core\Output;
class TinyHelper extends \OxidEsales\Eshop\Application\Controller\Admin\AdminController
class TinyHelper extends AdminController
{
protected $_sThisTemplate = "tiny/helper.tpl";
@ -31,13 +33,13 @@ class TinyHelper extends \OxidEsales\Eshop\Application\Controller\Admin\AdminCon
public function render()
{
$oOutput = oxRegistry::get("oxOutput");
/** @var Output $oOutput */
$oOutput = oxNew(Output::class);
$oOutput->setCharset($this->getCharSet());
$oOutput->setOutputFormat(oxOutput::OUTPUT_FORMAT_JSON);
$oOutput->setOutputFormat(Output::OUTPUT_FORMAT_JSON);
$oOutput->sendHeaders();
$oOutput->output('errors', $this->_errors);
$oOutput->output('content', $this->_content);
exit;
}
}

View File

@ -19,11 +19,13 @@
* @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3)
*/
namespace VanillaThunder\TinyMCE\Application\Core;
use \OxidEsales\Eshop\Core\Registry;
namespace O3\TinyMCE\Application\Core;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsServer;
/** funtion for adding quotes to config variables
/**
* funtion for adding quotes to config variables
* @param $string
* @return string
*/
@ -305,19 +307,15 @@ copyLongDesc = function(sIdent) {
protected function _getTinyToolbarControls()
{
$aControls = (method_exists(
get_parent_class(__CLASS__),
__FUNCTION__
)) ? parent::_getTinyToolbarControls() : array();
$aControls = [];
return $aControls;
}
protected function _getTinyExtPlugins()
{
$aPlugins = Registry::getConfig()->getConfigParam("aTinyMCE_external_plugins");
if (method_exists(get_parent_class(__CLASS__), __FUNCTION__)) {
$aPlugins = array_merge(parent::_getTinyExtPlugins(), $aPlugins);
}
return $aPlugins;
}
@ -327,9 +325,7 @@ copyLongDesc = function(sIdent) {
//$oModCfg->get('setting-name', 'module-id');
$aConfig = Registry::getConfig()->getConfigParam("aTinyMCE_config");
if (method_exists(get_parent_class(__CLASS__), __FUNCTION__)) {
$aConfig = array_merge(parent::_getTinyCustConfig(), $aConfig);
}
return $aConfig;
}
}

View File

@ -1,2 +1,3 @@
[{$smarty.block.parent}]
[{if method_exists($oViewConf,'loadTinyMce') }][{ $oViewConf->loadTinyMce() }][{/if}]

View File

@ -31,7 +31,7 @@
},
"autoload": {
"psr-4": {
"VanillaThunder\\TinyMCE\\": "../../../source/modules/o3-shop/tinymce-editor"
"O3\\TinyMCE\\": "../../../source/modules/o3-shop/tinymce-editor"
}
}
}

View File

@ -30,11 +30,11 @@ $aModule = [
'author' => 'Marat Bedoev, O3-Shop',
'url' => 'https://www.o3-shop.com/',
'extend' => [
OxidEsales\Eshop\Core\ViewConfig::class => VanillaThunder\TinyMCE\Application\Core\ViewConfig::class
OxidEsales\Eshop\Core\ViewConfig::class => O3\TinyMCE\Application\Core\ViewConfig::class
],
'controllers' => [
'tinyfilemanager' => VanillaThunder\TinyMCE\Application\Controller\Admin\TinyFileManager::class,
'tinyhelper' => VanillaThunder\TinyMCE\Application\Controller\Admin\TinyHelper::class
'tinyfilemanager' => O3\TinyMCE\Application\Controller\Admin\TinyFileManager::class,
'tinyhelper' => O3\TinyMCE\Application\Controller\Admin\TinyHelper::class
],
'templates' => [
'tiny/filemanager.tpl' => 'vt/TinyMCE/Application/views/admin/filemanager.tpl',