mirror of
https://github.com/Karaka-Management/oms-Shop.git
synced 2026-01-11 10:38:40 +00:00
bug fixes
This commit is contained in:
parent
92792549d1
commit
8fb4e0b182
7
Admin/Install/CMS.install.json
Normal file
7
Admin/Install/CMS.install.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[
|
||||
{
|
||||
"src": "Modules/Shop/Install/Application/Shop",
|
||||
"dest": "Web/Shop",
|
||||
"name": "Shop"
|
||||
}
|
||||
]
|
||||
45
Admin/Install/CMS.php
Normal file
45
Admin/Install/CMS.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 8.0
|
||||
*
|
||||
* @package Modules\Shop\Admin\Install
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Shop\Admin\Install;
|
||||
|
||||
use Model\Setting;
|
||||
use Model\SettingMapper;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
|
||||
/**
|
||||
* CMS class.
|
||||
*
|
||||
* @package Modules\Shop\Admin\Install
|
||||
* @license OMS License 1.0
|
||||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class CMS
|
||||
{
|
||||
/**
|
||||
* Install media providing
|
||||
*
|
||||
* @param string $path Module path
|
||||
* @param DatabasePool $dbPool Database pool for database interaction
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function install(string $path, DatabasePool $dbPool) : void
|
||||
{
|
||||
$app = \Modules\CMS\Admin\Installer::installExternal($dbPool, ['path' => __DIR__ . '/CMS.install.json']);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
"shop_category": {
|
||||
"name": "shop_category",
|
||||
"fields": {
|
||||
"shop_id": {
|
||||
"name": "shop_id",
|
||||
"shop_category_id": {
|
||||
"name": "shop_category_id",
|
||||
"type": "INT",
|
||||
"null": false,
|
||||
"primary": true
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ use phpOMS\DataStorage\Database\DatabasePool;
|
|||
use phpOMS\Module\InstallerAbstract;
|
||||
use phpOMS\Module\ModuleInfo;
|
||||
use phpOMS\System\File\Local\Directory;
|
||||
use phpOMS\Config\SettingsInterface;
|
||||
|
||||
/**
|
||||
* Installer class.
|
||||
|
|
@ -32,14 +33,15 @@ final class Installer extends InstallerAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function install(DatabasePool $dbPool, ModuleInfo $info) : void
|
||||
public static function install(DatabasePool $dbPool, ModuleInfo $info, SettingsInterface $cfgHandler) : void
|
||||
{
|
||||
if (\file_exists(__DIR__ . '/../../../Web/Shop')) {
|
||||
Directory::delete(__DIR__ . '/../../../Web/Shop');
|
||||
}
|
||||
|
||||
// @todo: replace with app installation (see TimeRecording...)
|
||||
Directory::copy(__DIR__ . '/Install/Shop', __DIR__ . '/../../../Web/Shop');
|
||||
|
||||
parent::install($dbPool, $info);
|
||||
parent::install($dbPool, $info, $cfgHandler);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user