oms-Notification/Controller/BackendController.php
Dennis Eichhorn 74b01a2186 init
2024-02-24 23:21:50 +00:00

71 lines
1.9 KiB
PHP
Executable File

<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\Notification
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\Notification\Controller;
use Modules\Dashboard\Models\DashboardElementInterface;
use phpOMS\Contract\RenderableInterface;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use phpOMS\Views\View;
/**
* Backend controller for the tasks module.
*
* @property \Web\WebApplication $app
*
* @package Modules\Notification
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
final class BackendController extends Controller implements DashboardElementInterface
{
/**
* Routing end-point for application behavior.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param array $data Generic data
*
* @return RenderableInterface Returns a renderable object
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewNotificationDashboard(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Notification/Theme/Backend/notification-dashboard');
return $view;
}
/**
* {@inheritdoc}
* @codeCoverageIgnore
*/
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Notification/Theme/Backend/dashboard-notification');
$notifications = [];
$view->data['notifications'] = $notifications;
return $view;
}
}