mirror of
https://github.com/Karaka-Management/oms-Home.git
synced 2026-02-16 12:58:41 +00:00
Added Home module
This commit is contained in:
commit
1e3e30a260
35
Admin/Install/Navigation.install.json
Normal file
35
Admin/Install/Navigation.install.json
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1006901001,
|
||||||
|
"pid": "/backend",
|
||||||
|
"type": 2,
|
||||||
|
"subtype": 0,
|
||||||
|
"name": "Home",
|
||||||
|
"uri": null,
|
||||||
|
"target": "self",
|
||||||
|
"icon": "fa fa-home",
|
||||||
|
"order": 10,
|
||||||
|
"from": "Home",
|
||||||
|
"permission": { "type": null, "element": null },
|
||||||
|
"parent": 0,
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1006900001,
|
||||||
|
"pid": "/backend",
|
||||||
|
"type": 1,
|
||||||
|
"subtype": 1,
|
||||||
|
"name": "Logout",
|
||||||
|
"uri": "/{/lang}/api/logout?{?}",
|
||||||
|
"target": "self",
|
||||||
|
"icon": "fa fa-power-off",
|
||||||
|
"order": 999,
|
||||||
|
"from": "Home",
|
||||||
|
"permission": {
|
||||||
|
"type": null,
|
||||||
|
"element": null
|
||||||
|
},
|
||||||
|
"parent": 0,
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
47
Admin/Install/Navigation.php
Normal file
47
Admin/Install/Navigation.php
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Home\Admin\Install;
|
||||||
|
|
||||||
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigation class.
|
||||||
|
*
|
||||||
|
* @package Modules
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Navigation
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Install navigation providing
|
||||||
|
*
|
||||||
|
* @param string $path Path to some file
|
||||||
|
* @param DatabasePool $dbPool Database pool for database interaction
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public static function install(string $path = null, DatabasePool $dbPool = null) : void
|
||||||
|
{
|
||||||
|
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
||||||
|
|
||||||
|
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
||||||
|
/** @var $class \Modules\Navigation\Admin\Installer */
|
||||||
|
$class::installExternal($dbPool, $navData);
|
||||||
|
}
|
||||||
|
}
|
||||||
39
Admin/Installer.php
Normal file
39
Admin/Installer.php
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Home\Admin;
|
||||||
|
|
||||||
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
use phpOMS\Module\InfoManager;
|
||||||
|
use phpOMS\Module\InstallerAbstract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Home install class.
|
||||||
|
*
|
||||||
|
* @package Modules
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Installer extends InstallerAbstract
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public static function install(string $path, DatabasePool $dbPool, InfoManager $info) : void
|
||||||
|
{
|
||||||
|
parent::install(__DIR__ . '/..', $dbPool, $info);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
Admin/Routes/Web/Backend.php
Normal file
6
Admin/Routes/Web/Backend.php
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
|
return [
|
||||||
|
];
|
||||||
3
Admin/Routes/console.php
Normal file
3
Admin/Routes/console.php
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$moduleRoutes = [];
|
||||||
3
Admin/Routes/socket.php
Normal file
3
Admin/Routes/socket.php
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$moduleRoutes = [];
|
||||||
32
Admin/Status.php
Normal file
32
Admin/Status.php
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Home\Admin;
|
||||||
|
|
||||||
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
use phpOMS\Module\StatusAbstract;
|
||||||
|
use phpOMS\Module\InfoManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigation class.
|
||||||
|
*
|
||||||
|
* @package Modules
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Status extends StatusAbstract
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
32
Admin/Uninstaller.php
Normal file
32
Admin/Uninstaller.php
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Home\Admin;
|
||||||
|
|
||||||
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
use phpOMS\Module\UninstallerAbstract;
|
||||||
|
use phpOMS\Module\InfoManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigation class.
|
||||||
|
*
|
||||||
|
* @package Modules
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Uninstaller extends UninstallerAbstract
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
42
Admin/Updater.php
Normal file
42
Admin/Updater.php
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Home\Admin;
|
||||||
|
|
||||||
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
|
use phpOMS\Module\UpdaterAbstract;
|
||||||
|
use phpOMS\System\File\Directory;
|
||||||
|
use phpOMS\Module\InfoManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigation class.
|
||||||
|
*
|
||||||
|
* @package Modules
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Updater extends UpdaterAbstract
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public static function update(DatabasePool $dbPool, InfoManager $info)
|
||||||
|
{
|
||||||
|
Directory::deletePath(__DIR__ . '/Update');
|
||||||
|
mkdir('Update');
|
||||||
|
parent::update($dbPool, $info);
|
||||||
|
}
|
||||||
|
}
|
||||||
85
Controller.php
Normal file
85
Controller.php
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Home;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Home class.
|
||||||
|
*
|
||||||
|
* @package Modules
|
||||||
|
* @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 = 'Home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module id.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const MODULE_ID = 1006900000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Providing.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected static $providing = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dependencies.
|
||||||
|
*
|
||||||
|
* @var string[]
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected static $dependencies = [
|
||||||
|
];
|
||||||
|
}
|
||||||
16
Theme/Backend/Lang/Navigation.en.lang.php
Normal file
16
Theme/Backend/Lang/Navigation.en.lang.php
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package TBD
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
return ['Navigation' => [
|
||||||
|
'Home' => 'Home',
|
||||||
|
'Logout' => 'Logout',
|
||||||
|
]];
|
||||||
BIN
img/module_teaser_small.png
Normal file
BIN
img/module_teaser_small.png
Normal file
Binary file not shown.
36
info.json
Normal file
36
info.json
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"id": 1006900000,
|
||||||
|
"internal": "Home",
|
||||||
|
"external": "Backend Home"
|
||||||
|
},
|
||||||
|
"category": "General",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"requirements": {
|
||||||
|
"phpOMS": "1.0.0",
|
||||||
|
"phpOMS-db": "1.0.0"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"name": "Orange Management",
|
||||||
|
"website": "www.spl1nes.com"
|
||||||
|
},
|
||||||
|
"description": "The backend home module.",
|
||||||
|
"directory": "Home",
|
||||||
|
"dependencies": {
|
||||||
|
"Admin": "1.0.0"
|
||||||
|
},
|
||||||
|
"providing": {
|
||||||
|
"Navigation": "*"
|
||||||
|
},
|
||||||
|
"load": [
|
||||||
|
{
|
||||||
|
"pid": [
|
||||||
|
"/backend"
|
||||||
|
],
|
||||||
|
"type": 5,
|
||||||
|
"from": "Home",
|
||||||
|
"for": "Navigation",
|
||||||
|
"file": "Navigation"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user