From 23b08d8dfe9eee937e17d576f1a44d1b5b46117e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 25 Dec 2018 19:03:01 +0100 Subject: [PATCH] Optimize navigation install --- Admin/Install/Navigation.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 47953fa..ca5cb20 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -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']); } }