mirror of
https://github.com/Karaka-Management/oms-ProjectManagement.git
synced 2026-02-10 12:58:41 +00:00
Split controllers per application
This commit is contained in:
parent
9b83f7a21e
commit
9480aa4b61
|
|
@ -3,15 +3,15 @@
|
||||||
use phpOMS\Router\RouteVerb;
|
use phpOMS\Router\RouteVerb;
|
||||||
use phpOMS\Account\PermissionType;
|
use phpOMS\Account\PermissionType;
|
||||||
use Modules\ProjectManagement\Models\PermissionState;
|
use Modules\ProjectManagement\Models\PermissionState;
|
||||||
use Modules\ProjectManagement\Controller;
|
use Modules\ProjectManagement\Controller\BackendController;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'^.*/backend/projectmanagement/list.*$' => [
|
'^.*/backend/projectmanagement/list.*$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\ProjectManagement\Controller:viewProjectManagementList',
|
'dest' => '\Modules\ProjectManagement\Controller\BackendController:viewProjectManagementList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => Controller::MODULE_NAME,
|
'module' => BackendController::MODULE_NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::PROJECT,
|
'state' => PermissionState::PROJECT,
|
||||||
],
|
],
|
||||||
|
|
@ -19,10 +19,10 @@ return [
|
||||||
],
|
],
|
||||||
'^.*/backend/projectmanagement/create.*$' => [
|
'^.*/backend/projectmanagement/create.*$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\ProjectManagement\Controller:viewProjectManagementCreate',
|
'dest' => '\Modules\ProjectManagement\Controller\BackendController:viewProjectManagementCreate',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => Controller::MODULE_NAME,
|
'module' => BackendController::MODULE_NAME,
|
||||||
'type' => PermissionType::CREATE,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionState::PROJECT,
|
'state' => PermissionState::PROJECT,
|
||||||
],
|
],
|
||||||
|
|
@ -30,10 +30,10 @@ return [
|
||||||
],
|
],
|
||||||
'^.*/backend/projectmanagement/profile.*$' => [
|
'^.*/backend/projectmanagement/profile.*$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\ProjectManagement\Controller:viewProjectManagementProfile',
|
'dest' => '\Modules\ProjectManagement\Controller\BackendController:viewProjectManagementProfile',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => Controller::MODULE_NAME,
|
'module' => BackendController::MODULE_NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionState::PROJECT,
|
'state' => PermissionState::PROJECT,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\ProjectManagement;
|
namespace Modules\ProjectManagement\Controller;
|
||||||
|
|
||||||
use Modules\Navigation\Models\Navigation;
|
use Modules\Navigation\Models\Navigation;
|
||||||
use Modules\Navigation\Views\NavigationView;
|
use Modules\Navigation\Views\NavigationView;
|
||||||
|
|
@ -34,58 +34,8 @@ use phpOMS\Asset\AssetType;
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
* @since 1.0.0
|
* @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 = 'ProjectManagement';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module id.
|
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public const MODULE_ID = 1001700000;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 RequestAbstract $request Request
|
||||||
* @param ResponseAbstract $response Response
|
* @param ResponseAbstract $response Response
|
||||||
88
Controller/Controller.php
Normal file
88
Controller/Controller.php
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package Modules\ProjectManagement
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\ProjectManagement\Controller;
|
||||||
|
|
||||||
|
use Modules\Navigation\Models\Navigation;
|
||||||
|
use Modules\Navigation\Views\NavigationView;
|
||||||
|
use phpOMS\Contract\RenderableInterface;
|
||||||
|
use phpOMS\Message\RequestAbstract;
|
||||||
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
use phpOMS\Module\ModuleAbstract;
|
||||||
|
use phpOMS\Module\WebInterface;
|
||||||
|
use phpOMS\Views\View;
|
||||||
|
use Modules\ProjectManagement\Models\ProjectMapper;
|
||||||
|
use Modules\ProjectManagement\Models\Project;
|
||||||
|
use phpOMS\Asset\AssetType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event Management controller class.
|
||||||
|
*
|
||||||
|
* @package Modules\ProjectManagement
|
||||||
|
* @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 = 'ProjectManagement';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module id.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const MODULE_ID = 1001700000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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