mirror of
https://github.com/Karaka-Management/oms-EventManagement.git
synced 2026-01-23 14:28:42 +00:00
Split controllers per application
This commit is contained in:
parent
c62c58b50a
commit
7c3b37c968
|
|
@ -3,15 +3,15 @@
|
|||
use phpOMS\Router\RouteVerb;
|
||||
use phpOMS\Account\PermissionType;
|
||||
use Modules\EventManagement\Models\PermissionState;
|
||||
use Modules\EventManagement\Controller;
|
||||
use Modules\EventManagement\Controller\BackendController;
|
||||
|
||||
return [
|
||||
'^.*/backend/eventmanagement/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\EventManagement\Controller:viewEventManagementList',
|
||||
'dest' => '\Modules\EventManagement\Controller\BackendController:viewEventManagementList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::EVENT,
|
||||
],
|
||||
|
|
@ -19,10 +19,10 @@ return [
|
|||
],
|
||||
'^.*/backend/eventmanagement/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\EventManagement\Controller:viewEventManagementCreate',
|
||||
'dest' => '\Modules\EventManagement\Controller\BackendController:viewEventManagementCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::EVENT,
|
||||
],
|
||||
|
|
@ -30,10 +30,10 @@ return [
|
|||
],
|
||||
'^.*/backend/eventmanagement/profile.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\EventManagement\Controller:viewEventManagementProfile',
|
||||
'dest' => '\Modules\EventManagement\Controller\BackendController:viewEventManagementProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::EVENT,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\EventManagement;
|
||||
namespace Modules\EventManagement\Controller;
|
||||
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
|
|
@ -31,58 +31,9 @@ use phpOMS\Asset\AssetType;
|
|||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*/
|
||||
final class Controller extends ModuleAbstract implements WebInterface
|
||||
class BackendController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Module path.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_PATH = __DIR__;
|
||||
|
||||
/**
|
||||
* Module version.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_VERSION = '1.0.0';
|
||||
|
||||
/**
|
||||
* Module name.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_NAME = 'EventManagement';
|
||||
|
||||
/**
|
||||
* Module id.
|
||||
*
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_ID = 1004200000;
|
||||
|
||||
/**
|
||||
* Providing.
|
||||
*
|
||||
* @var string[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $providing = [];
|
||||
|
||||
/**
|
||||
* Dependencies.
|
||||
*
|
||||
* @var string[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $dependencies = [
|
||||
];
|
||||
|
||||
/**
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
85
Controller/Controller.php
Normal file
85
Controller/Controller.php
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.2
|
||||
*
|
||||
* @package Modules\EventManagement
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://website.orange-management.de
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\EventManagement\Controller;
|
||||
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Module\ModuleAbstract;
|
||||
use phpOMS\Module\WebInterface;
|
||||
use phpOMS\Views\View;
|
||||
use Modules\EventManagement\Models\EventMapper;
|
||||
use Modules\EventManagement\Models\Event;
|
||||
use phpOMS\Asset\AssetType;
|
||||
|
||||
/**
|
||||
* Event Management controller class.
|
||||
*
|
||||
* @package Modules\EventManagement
|
||||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Controller extends ModuleAbstract implements WebInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Module path.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_PATH = __DIR__ . '/../';
|
||||
|
||||
/**
|
||||
* Module version.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_VERSION = '1.0.0';
|
||||
|
||||
/**
|
||||
* Module name.
|
||||
*
|
||||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_NAME = 'EventManagement';
|
||||
|
||||
/**
|
||||
* Module id.
|
||||
*
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_ID = 1004200000;
|
||||
|
||||
/**
|
||||
* Providing.
|
||||
*
|
||||
* @var string[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $providing = [];
|
||||
|
||||
/**
|
||||
* Dependencies.
|
||||
*
|
||||
* @var string[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $dependencies = [
|
||||
];
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user