mirror of
https://github.com/Karaka-Management/oms-BankAccounting.git
synced 2026-01-11 15:18:42 +00:00
Optimize navigation install
This commit is contained in:
parent
3a5bbd2027
commit
fa1e1dde51
|
|
@ -29,7 +29,7 @@ class Navigation
|
|||
/**
|
||||
* Install navigation providing
|
||||
*
|
||||
* @param string $path Path to some file
|
||||
* @param string $path Module path
|
||||
* @param DatabasePool $dbPool Database pool for database interaction
|
||||
*
|
||||
* @return void
|
||||
|
|
@ -38,20 +38,6 @@ class Navigation
|
|||
*/
|
||||
public static function install(string $path = null, DatabasePool $dbPool = null) : void
|
||||
{
|
||||
$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);
|
||||
\Modules\Navigation\Admin\Installer::installExternal($dbPool, ['path' => __DIR__ . '/Navigation.install.json']);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user