Scrab exp. smoothing. wrong

This commit is contained in:
Dennis Eichhorn 2017-11-14 16:12:50 +01:00
commit 89de6d98ff
21 changed files with 609 additions and 0 deletions

40
Admin/Activate.php Normal file
View File

@ -0,0 +1,40 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @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\Help\Admin;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\ActivateAbstract;
use phpOMS\Module\InfoManager;
/**
* Navigation class.
*
* @category Modules
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class Activate extends ActivateAbstract
{
/**
* {@inheritdoc}
*/
public static function activate(DatabasePool $dbPool, InfoManager $info)
{
parent::activate($dbPool, $info);
}
}

40
Admin/Deactivate.php Normal file
View File

@ -0,0 +1,40 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @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\Help\Admin;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\DeactivateAbstract;
use phpOMS\Module\InfoManager;
/**
* Navigation class.
*
* @category Modules
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class Deactivate extends DeactivateAbstract
{
/**
* {@inheritdoc}
*/
public static function deactivate(DatabasePool $dbPool, InfoManager $info)
{
parent::deactivate($dbPool, $info);
}
}

View File

@ -0,0 +1,63 @@
[
{
"id": 1007801001,
"pid": "/backend",
"type": 2,
"subtype": 0,
"name": "Help",
"uri": null,
"target": "self",
"icon": "fa fa-question-circle",
"order": 0,
"from": "Help",
"permission": null,
"parent": 0,
"children": [
{
"id": 1007802001,
"pid": "/backend",
"type": 2,
"subtype": 1,
"name": "General",
"uri": "/{/lang}/backend/help/general?{?}",
"target": "self",
"icon": null,
"order": 5,
"from": "Help",
"permission": null,
"parent": 1007801001,
"children": []
},
{
"id": 1007803001,
"pid": "/backend",
"type": 2,
"subtype": 1,
"name": "Modules",
"uri": "/{/lang}/backend/help/module/list?{?}",
"target": "self",
"icon": null,
"order": 10,
"from": "Help",
"permission": null,
"parent": 1007801001,
"children": []
},
{
"id": 1007804001,
"pid": "/backend",
"type": 2,
"subtype": 1,
"name": "Developer",
"uri": "/{/lang}/backend/help/developer?{?}",
"target": "self",
"icon": null,
"order": 15,
"from": "Help",
"permission": null,
"parent": 1007801001,
"children": []
}
]
}
]

View File

@ -0,0 +1,37 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @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\Help\Admin\Install;
use phpOMS\DataStorage\Database\DatabasePool;
/**
* Navigation class.
*
* @category Modules
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class Navigation
{
public static function install(string $path, DatabasePool $dbPool)
{
$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);
}
}

40
Admin/Installer.php Normal file
View File

@ -0,0 +1,40 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @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\Help\Admin;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\InfoManager;
use phpOMS\Module\InstallerAbstract;
/**
* Help install class.
*
* @category Modules
* @package Modules\BackendHelp
* @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)
{
parent::install(__DIR__ . '/..', $dbPool, $info);
}
}

View File

@ -0,0 +1,30 @@
<?php
use phpOMS\Router\RouteVerb;
return [
'^.*/backend/help/general(\?.*)?$' => [
[
'dest' => '\Modules\Help\Controller:viewHelpGeneral',
'verb' => RouteVerb::GET,
],
],
'^.*/backend/help/module/list(\?.*)?$' => [
[
'dest' => '\Modules\Help\Controller:viewHelpModuleList',
'verb' => RouteVerb::GET,
],
],
'^.*/backend/help/module/single(\?.*)?$' => [
[
'dest' => '\Modules\Help\Controller:viewHelpModule',
'verb' => RouteVerb::GET,
],
],
'^.*/backend/help/developer(\?.*)?$' => [
[
'dest' => '\Modules\Help\Controller:viewHelpDeveloper',
'verb' => RouteVerb::GET,
],
],
];

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

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

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

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

40
Admin/Uninstall.php Normal file
View File

@ -0,0 +1,40 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @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\Help\Admin;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\UninstallAbstract;
use phpOMS\Module\InfoManager;
/**
* Navigation class.
*
* @category Modules
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class Uninstall extends UninstallAbstract
{
/**
* {@inheritdoc}
*/
public static function uninstall(DatabasePool $dbPool, InfoManager $info)
{
parent::uninstall($dbPool, $info);
}
}

44
Admin/Update.php Normal file
View File

@ -0,0 +1,44 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @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\Help\Admin;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\UpdateAbstract;
use phpOMS\System\File\Directory;
use phpOMS\Module\InfoManager;
/**
* Navigation class.
*
* @category Modules
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class Update extends UpdateAbstract
{
/**
* {@inheritdoc}
*/
public static function update(DatabasePool $dbPool, InfoManager $info)
{
Directory::deletePath(__DIR__ . '/Update');
mkdir('Update');
parent::update($dbPool, $info);
}
}

181
Controller.php Normal file
View File

@ -0,0 +1,181 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @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\Help;
use Modules\Navigation\Models\Navigation;
use Modules\Navigation\Views\NavigationView;
use phpOMS\Contract\RenderableInterface;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use phpOMS\Utils\Parser\Markdown\Markdown;
use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\WebInterface;
use phpOMS\Views\View;
/**
* Help class.
*
* @category Modules
* @package Modules\Help
* @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 = 'Help';
/**
* Module id.
*
* @var int
* @since 1.0.0
*/
/* public */ const MODULE_ID = 1007800000;
/**
* 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 ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHelp(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
{
$view = new View($this->app, $request, $response);
$view->setTemplate('/Modules/Help/Theme/Backend/help');
return $view;
}
/**
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHelpGeneral(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
{
$view = new View($this->app, $request, $response);
$view->setTemplate('/Modules/Help/Theme/Backend/help-general');
$view->setData('markdown', Markdown::parse(file_get_contents(__DIR__ . '/../../Documentation/README.md')));
return $view;
}
/**
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHelpModuleList(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
{
$view = new View($this->app, $request, $response);
$view->setTemplate('/Modules/Help/Theme/Backend/help-module-list');
return $view;
}
/**
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHelpModule(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
{
$view = new View($this->app, $request, $response);
$view->setTemplate('/Modules/Help/Theme/Backend/help-module');
return $view;
}
/**
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewHelpDeveloper(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
{
$view = new View($this->app, $request, $response);
$view->setTemplate('/Modules/Help/Theme/Backend/help-developer');
$view->setData('markdown', Markdown::parse(file_get_contents(__DIR__ . '/../../Developer-Guide/README.md')));
return $view;
}
}

21
Docs/introduction.md Normal file
View File

@ -0,0 +1,21 @@
# Introduction
The **Dashboard** module is one of the essential core modules that is always required. This module is responsible for providing a personalizable dashboard after login.
## Target Group
The target group for this module is everyone.
# Setup
The module can be installed through the integrated module downloader and installer or by uploading the module into the `Modules/` directory and executing the installation through the module installer.
# Features
## Customizability
The dashboard can be custamized by every user according to his/her needs. It's also possible to define default dashboards for different user groups which can be used by users. This allows the administrator to provide default dashboards which then can be used without manually creating a dashboard.
## Extendability
All modules can provide one or multiple dashboard components which can be integrated in the dashboard.

1
README.md Normal file
View File

@ -0,0 +1 @@
# Backend Dashboard #

View File

@ -0,0 +1,19 @@
<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @category TBD
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
return ['Navigation' => [
'Help' => 'Help',
'General' => 'General',
'Modules' => 'Modules',
'Developer' => 'Developer',
]];

View File

@ -0,0 +1 @@
<?= $this->getData('markdown'); ?>

View File

@ -0,0 +1 @@
<?= $this->getData('markdown'); ?>

View File

View File

View File

BIN
img/module_teaser_small.png Normal file

Binary file not shown.

45
info.json Normal file
View File

@ -0,0 +1,45 @@
{
"name": {
"id": 1007800000,
"internal": "Help",
"external": "Backend Help"
},
"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 help module.",
"directory": "Help",
"dependencies": {
"Admin" : "1.0.0"
},
"providing": {
"Navigation": "*"
},
"load": [
{
"pid": [
"/backend/help"
],
"type": 4,
"for": "Content",
"from": "Help",
"file": "Help"
},
{
"pid": [
"/backend"
],
"type": 5,
"from": "Help",
"for": "Navigation",
"file": "Navigation"
}
]
}