mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-01-11 16:18:40 +00:00
51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Orange Management
|
|
*
|
|
* PHP Version 7.2
|
|
*
|
|
* @package Modules\Organization\Admin\Install
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 1.0
|
|
* @version 1.0.0
|
|
* @link http://website.orange-management.de
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Organization\Admin\Install;
|
|
|
|
use phpOMS\DataStorage\Database\DatabasePool;
|
|
|
|
/**
|
|
* Navigation class.
|
|
*
|
|
* @package Modules\Organization\Admin\Install
|
|
* @license OMS License 1.0
|
|
* @link http://website.orange-management.de
|
|
* @since 1.0.0
|
|
*/
|
|
class Navigation
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function install(string $path, DatabasePool $dbPool)
|
|
{
|
|
$navFile = \file_get_contents(__DIR__ . '/Navigation.install.json');
|
|
|
|
if ($navFile === false) {
|
|
throw new \Exception();
|
|
}
|
|
|
|
$navData = \json_decode($navFile, true);
|
|
|
|
if ($navData === false) {
|
|
throw new \Exception();
|
|
}
|
|
|
|
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
|
/** @var $class \Modules\Navigation\Admin\Installer */
|
|
$class::installExternal($dbPool, $navData);
|
|
}
|
|
}
|