diff --git a/Admin/Install/Comments.php b/Admin/Install/Comments.php index 2ede57e..10d888d 100755 --- a/Admin/Install/Comments.php +++ b/Admin/Install/Comments.php @@ -15,8 +15,8 @@ declare(strict_types=1); namespace Modules\News\Admin\Install; use phpOMS\Autoloader; -use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\DataStorage\Database\Schema\Builder; +use phpOMS\Application\ApplicationAbstract; /** * Comments class. @@ -32,15 +32,15 @@ class Comments * Install comment relation * * @param string $path Module path - * @param DatabasePool $dbPool Database pool for database interaction + * @param ApplicationAbstract $app Application * * @return void * * @since 1.0.0 */ - public static function install(string $path, DatabasePool $dbPool) : void + public static function install(string $path, ApplicationAbstract $app) : void { - $builder = new Builder($dbPool->get('schema')); + $builder = new Builder($app->dbPool->get('schema')); $builder->alterTable('news') ->addConstraint('news_comment_list', 'comments_list', 'comments_list_id') ->execute(); diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 178980f..d5391e0 100755 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Modules\News\Admin\Install; -use phpOMS\DataStorage\Database\DatabasePool; +use phpOMS\Application\ApplicationAbstract; /** * Navigation class. @@ -30,14 +30,14 @@ class Navigation * Install navigation providing * * @param string $path Module path - * @param DatabasePool $dbPool Database pool for database interaction + * @param ApplicationAbstract $app Application * * @return void * * @since 1.0.0 */ - public static function install(string $path, DatabasePool $dbPool) : void + public static function install(string $path, ApplicationAbstract $app) : void { - \Modules\Navigation\Admin\Installer::installExternal($dbPool, ['path' => __DIR__ . '/Navigation.install.json']); + \Modules\Navigation\Admin\Installer::installExternal($app, ['path' => __DIR__ . '/Navigation.install.json']); } }