oms-Calendar/Theme/Backend/Components/Calendar/BaseView.php
2020-02-06 23:54:01 +01:00

57 lines
1.2 KiB
PHP

<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Calendar
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Calendar\Theme\Backend\Components\Calendar;
use phpOMS\Localization\L11nManager;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use phpOMS\Views\View;
/**
* Component view.
*
* @package Modules\Calendar
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @codeCoverageIgnore
*/
class BaseView extends View
{
protected $calendar = [];
/**
* {@inheritdoc}
*/
public function __construct(L11nManager $l11n = null, RequestAbstract $request, ResponseAbstract $response)
{
parent::__construct($l11n, $request, $response);
$this->setTemplate('/Modules/Calendar/Theme/Backend/Components/Calendar/mini');
}
/**
* {@inheritdoc}
*/
public function render(...$data) : string
{
if (empty($data) || $data[0] === null) {
return '';
}
$this->calendar = $data[0];
return parent::render();
}
}