mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-01-11 17:18:42 +00:00
64 lines
1.5 KiB
PHP
64 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.2
|
|
*
|
|
* @package TBD
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link http://website.orange-management.de
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Editor\Theme\Backend\Components\Editor;
|
|
|
|
use phpOMS\ApplicationAbstract;
|
|
use phpOMS\Asset\AssetType;
|
|
use phpOMS\Message\RequestAbstract;
|
|
use phpOMS\Message\ResponseAbstract;
|
|
use phpOMS\Views\View;
|
|
|
|
/**
|
|
* Component view.
|
|
*
|
|
* @package TBD
|
|
* @license OMS License 1.0
|
|
* @link http://website.orange-management.de
|
|
* @since 1.0.0
|
|
* @codeCoverageIgnore
|
|
*/
|
|
class BaseView extends View
|
|
{
|
|
private $id = '';
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function __construct(ApplicationAbstract $app, RequestAbstract $request, ResponseAbstract $response)
|
|
{
|
|
parent::__construct($app, $request, $response);
|
|
$this->setTemplate('/Modules/Editor/Theme/Backend/Components/Editor/inline-editor-tools');
|
|
|
|
$response->get('Content')->getData('head')->addAsset(AssetType::JSLATE, 'Modules/Editor/Controller.js', ['type' => 'module']);
|
|
|
|
$view = new TextView($app, $request, $response);
|
|
$this->addData('text', $view);
|
|
}
|
|
|
|
public function getId() : string
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function render(...$data) : string
|
|
{
|
|
$this->id = ($data[0] ?? '') . '-tools';
|
|
return parent::render();
|
|
}
|
|
}
|