Split controllers per application

This commit is contained in:
Dennis Eichhorn 2018-09-19 21:34:04 +02:00
parent 3d661ee769
commit bd23899bf9
2 changed files with 89 additions and 54 deletions

View File

@ -12,7 +12,7 @@
*/
declare(strict_types=1);
namespace Modules\Navigation;
namespace Modules\Navigation\Controller;
use Modules\Navigation\Models\Navigation;
use Modules\Navigation\Models\NavigationType;
@ -31,59 +31,8 @@ use phpOMS\Module\WebInterface;
* @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 = 'Navigation';
/**
* Module id.
*
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1000500000;
/**
* Providing.
*
* @var string[]
* @since 1.0.0
*/
protected static $providing = [
];
/**
* Dependencies.
*
* @var string[]
* @since 1.0.0
*/
protected static $dependencies = [
];
/**
* Create mid navigation
*
@ -154,7 +103,7 @@ final class Controller extends ModuleAbstract implements WebInterface
continue;
}
$path = __DIR__ . '/../..' . $path . '.' . $response->getHeader()->getL11n()->getLanguage() . '.lang.php';
$path = __DIR__ . '/../../..' . $path . '.' . $response->getHeader()->getL11n()->getLanguage() . '.lang.php';
/** @noinspection PhpIncludeInspection */
$lang = include $path;

86
Controller/Controller.php Normal file
View File

@ -0,0 +1,86 @@
<?php
/**
* Orange Management
*
* PHP Version 7.2
*
* @package Modules\Navigation
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
declare(strict_types=1);
namespace Modules\Navigation\Controller;
use Modules\Navigation\Models\Navigation;
use Modules\Navigation\Models\NavigationType;
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;
/**
* Navigation class.
*
* @package Modules\Navigation
* @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 = 'Navigation';
/**
* Module id.
*
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1000500000;
/**
* Providing.
*
* @var string[]
* @since 1.0.0
*/
protected static $providing = [
];
/**
* Dependencies.
*
* @var string[]
* @since 1.0.0
*/
protected static $dependencies = [
];
}