Routings moved to routing files

This commit is contained in:
Dennis Eichhorn 2016-04-01 22:16:21 +02:00
parent b000f28c70
commit 73607dd70f
4 changed files with 82 additions and 20 deletions

3
Admin/Routes/console.php Normal file
View File

@ -0,0 +1,3 @@
<?php
$consoleRoutes = [];

76
Admin/Routes/http.php Normal file
View File

@ -0,0 +1,76 @@
<?php
$httpRoutes = [
'^.*/backend/organization/unit/list.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewUnitList',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
'^.*/backend/organization/unit/profile.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewUnitProfile',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
'^.*/backend/organization/unit/create.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewUnitCreate',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
'^.*/backend/organization/department/list.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewDepartmentList',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
'^.*/backend/organization/department/profile.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewDepartmentProfile',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
'^.*/backend/organization/department/create.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewDepartmentCreate',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
'^.*/backend/organization/position/list.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewPositionList',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
'^.*/backend/organization/position/profile.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewPositionProfile',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
'^.*/backend/organization/position/create.*$' => [
[
'dest' => '\Modules\Organization\Controller:viewPositionCreate',
'verb' => RouteVerb::GET,
'result' => ViewType::HTML,
'layout' => ViewLayout::MAIN,
],
],
];

3
Admin/Routes/socket.php Normal file
View File

@ -0,0 +1,3 @@
<?php
$socketRoutes = [];

View File

@ -91,26 +91,6 @@ class Controller extends ModuleAbstract implements WebInterface
protected static $dependencies = [
];
/**
* Routing elements.
*
* @var array
* @since 1.0.0
*/
protected static $routes = [
'^.*/backend/organization/unit/list.*$' => [['dest' => '\Modules\Organization\Controller:viewUnitList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/organization/unit/profile.*$' => [['dest' => '\Modules\Organization\Controller:viewUnitProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/organization/unit/create.*$' => [['dest' => '\Modules\Organization\Controller:viewUnitCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/organization/department/list.*$' => [['dest' => '\Modules\Organization\Controller:viewDepartmentList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/organization/department/profile.*$' => [['dest' => '\Modules\Organization\Controller:viewDepartmentProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/organization/department/create.*$' => [['dest' => '\Modules\Organization\Controller:viewDepartmentCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/organization/position/list.*$' => [['dest' => '\Modules\Organization\Controller:viewPositionList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/organization/position/profile.*$' => [['dest' => '\Modules\Organization\Controller:viewPositionProfile', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
'^.*/backend/organization/position/create.*$' => [['dest' => '\Modules\Organization\Controller:viewPositionCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
];
/**
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response