mirror of
https://github.com/Karaka-Management/oms-Accounting.git
synced 2026-01-25 02:58:41 +00:00
Split controllers per application
This commit is contained in:
parent
e5b3c7f011
commit
fc2de60fac
|
|
@ -3,15 +3,15 @@
|
|||
use phpOMS\Router\RouteVerb;
|
||||
use phpOMS\Account\PermissionType;
|
||||
use Modules\Accounting\Models\PermissionState;
|
||||
use Modules\Accounting\Controller;
|
||||
use Modules\Accounting\Controller\BackendController;
|
||||
|
||||
return [
|
||||
'^.*/backend/accounting/personal/entries.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewPersonalEntries',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewPersonalEntries',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::PERSONAL,
|
||||
],
|
||||
|
|
@ -19,10 +19,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/impersonal/entries.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewImpersonalEntries',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewImpersonalEntries',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::IMPERSONAL,
|
||||
],
|
||||
|
|
@ -30,10 +30,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/entries.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewEntries',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewEntries',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::ENTRY,
|
||||
],
|
||||
|
|
@ -41,10 +41,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/impersonal/journal/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewJournalList',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewJournalList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::JOURNAL,
|
||||
],
|
||||
|
|
@ -52,10 +52,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/stack/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackList',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
|
|
@ -63,10 +63,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/stack/entries.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackEntries',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackEntries',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
|
|
@ -74,10 +74,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/stack/archive/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackArchiveList',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackArchiveList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
|
|
@ -85,10 +85,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/stack/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackCreate',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
|
|
@ -96,10 +96,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/stack/predefined/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackPredefinedList',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackPredefinedList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
|
|
@ -107,10 +107,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/gl/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewGLList',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewGLList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::GL,
|
||||
],
|
||||
|
|
@ -118,10 +118,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/gl/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewGLCreate',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewGLCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::GL,
|
||||
],
|
||||
|
|
@ -129,10 +129,10 @@ return [
|
|||
],
|
||||
'^.*/backend/accounting/gl/profile.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewGLProfile',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewGLProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::GL,
|
||||
],
|
||||
|
|
@ -140,10 +140,10 @@ return [
|
|||
],
|
||||
'^.*/api/accounting/dun/print.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewCostCenterProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::COST_CENTER,
|
||||
],
|
||||
|
|
@ -151,10 +151,10 @@ return [
|
|||
],
|
||||
'^.*/api/accounting/statement/print.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewCostCenterProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::ACCOUNT,
|
||||
],
|
||||
|
|
@ -162,10 +162,10 @@ return [
|
|||
],
|
||||
'^.*/api/accounting/balances/print.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewCostCenterProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::ACCOUNT,
|
||||
],
|
||||
|
|
@ -173,10 +173,10 @@ return [
|
|||
],
|
||||
'^.*/api/accounting/accountform/print.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile',
|
||||
'dest' => '\Modules\Accounting\Controller\BackendController:viewCostCenterProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::ACCOUNT,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Accounting;
|
||||
namespace Modules\Accounting\Controller;
|
||||
|
||||
use Modules\Navigation\Models\Navigation;
|
||||
use Modules\Navigation\Views\NavigationView;
|
||||
|
|
@ -31,59 +31,9 @@ use phpOMS\Views\View;
|
|||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*/
|
||||
final class Controller extends ModuleAbstract implements WebInterface
|
||||
final 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 = 'Accounting';
|
||||
|
||||
/**
|
||||
* Module id.
|
||||
*
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_ID = 1002600000;
|
||||
|
||||
/**
|
||||
* Providing.
|
||||
*
|
||||
* @var string[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $providing = [];
|
||||
|
||||
/**
|
||||
* Dependencies.
|
||||
*
|
||||
* @var string[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $dependencies = [
|
||||
'Media',
|
||||
];
|
||||
|
||||
/**
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
86
Controller/Controller.php
Normal file
86
Controller/Controller.php
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.2
|
||||
*
|
||||
* @package Modules\Accounting
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://website.orange-management.de
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Accounting\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;
|
||||
|
||||
/**
|
||||
* Accounting class.
|
||||
*
|
||||
* @package Modules\Accounting
|
||||
* @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 = 'Accounting';
|
||||
|
||||
/**
|
||||
* Module id.
|
||||
*
|
||||
* @var int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public const MODULE_ID = 1002600000;
|
||||
|
||||
/**
|
||||
* Providing.
|
||||
*
|
||||
* @var string[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $providing = [];
|
||||
|
||||
/**
|
||||
* Dependencies.
|
||||
*
|
||||
* @var string[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $dependencies = [
|
||||
'Media',
|
||||
];
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user