tinymce-editor/Application/Core/ViewConfig.php

59 lines
1.4 KiB
PHP
Raw Normal View History

2020-06-09 03:09:43 +02:00
<?php
2023-04-02 23:00:41 +02:00
/**
2024-12-04 15:09:22 +01:00
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
2023-04-02 23:00:41 +02:00
*
2024-12-04 15:09:22 +01:00
* @copyright (C) 2022 Marat Bedoev, bestlife AG
* @copyright (C) 2023 O3-Shop (https://www.o3-shop.com)
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
2020-06-09 03:09:43 +02:00
*/
2023-04-05 08:27:08 +02:00
declare(strict_types=1);
2023-04-02 23:49:41 +02:00
namespace O3\TinyMCE\Application\Core;
2023-04-05 08:27:08 +02:00
use O3\TinyMCE\Application\Core\TinyMCE\Loader;
2023-04-02 23:49:41 +02:00
use OxidEsales\Eshop\Core\Registry;
2022-06-09 21:11:02 +02:00
2020-06-09 03:09:43 +02:00
class ViewConfig extends ViewConfig_parent
{
2023-04-05 08:27:08 +02:00
/**
* @return string
*/
public function getTinyMceInitCode(): string
2020-06-09 03:09:43 +02:00
{
2023-04-05 08:27:08 +02:00
$config = Registry::getConfig();
$language = Registry::getLang();
2023-04-02 23:49:41 +02:00
2023-04-05 08:27:08 +02:00
$loader = oxNew(Loader::class, $config, $language);
2023-04-05 08:53:11 +02:00
return $loader->getEditorCode();
2020-06-09 03:09:43 +02:00
}
2024-12-04 14:25:51 +01:00
/**
* @return string[]
*/
public function getTinyMceScripts(): array
{
$config = Registry::getConfig();
$language = Registry::getLang();
$loader = oxNew(Loader::class, $config, $language);
return $loader->getScripts();
}
2024-12-04 14:25:51 +01:00
/**
* @return string[]
*/
public function getTinyMceIncludes(): array
{
$config = Registry::getConfig();
$language = Registry::getLang();
$loader = oxNew(Loader::class, $config, $language);
return $loader->getIncludes();
}
2023-04-05 08:27:08 +02:00
}