diff --git a/Admin/Activate.php b/Admin/Activate.php index fe8044a..4b4139d 100644 --- a/Admin/Activate.php +++ b/Admin/Activate.php @@ -15,7 +15,7 @@ */ namespace Modules\Billing\Admin; -use phpOMS\DataStorage\Database\DatabaseType; + use phpOMS\DataStorage\Database\Pool; use phpOMS\Module\ActivateAbstract; diff --git a/Admin/Deactivate.php b/Admin/Deactivate.php index f901afc..b037163 100644 --- a/Admin/Deactivate.php +++ b/Admin/Deactivate.php @@ -15,7 +15,7 @@ */ namespace Modules\Billing\Admin; -use phpOMS\DataStorage\Database\DatabaseType; + use phpOMS\DataStorage\Database\Pool; use phpOMS\Module\DeactivateAbstract; diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index ef003aa..b236b89 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -14,6 +14,7 @@ * @link http://orange-management.com */ namespace Modules\Billing\Admin\Install; +use phpOMS\DataStorage\Database\Pool; /** * Navigation class. @@ -33,6 +34,7 @@ class Navigation $navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true); $class = '\\Modules\\Navigation\\Admin\\Installer'; + /** @var $class \Modules\Navigation\Admin\Installer */ $class::installExternal($dbPool, $navData); } } diff --git a/Admin/Uninstall.php b/Admin/Uninstall.php index a7699a9..67eeb3e 100644 --- a/Admin/Uninstall.php +++ b/Admin/Uninstall.php @@ -15,7 +15,7 @@ */ namespace Modules\Billing\Admin; -use phpOMS\DataStorage\Database\DatabaseType; + use phpOMS\DataStorage\Database\Pool; use phpOMS\Module\UninstallAbstract; diff --git a/Admin/Update.php b/Admin/Update.php index 60ac61a..37277f7 100644 --- a/Admin/Update.php +++ b/Admin/Update.php @@ -15,9 +15,10 @@ */ namespace Modules\Billing\Admin; -use phpOMS\DataStorage\Database\DatabaseType; + use phpOMS\DataStorage\Database\Pool; use phpOMS\Module\UpdateAbstract; +use phpOMS\System\FileSystem; /** * Navigation class. @@ -38,6 +39,8 @@ class Update extends UpdateAbstract */ public static function update(Pool $dbPool, array $info) { + FileSystem::deletePath(__DIR__ . '/Update'); + mkdir('Update'); parent::update($dbPool, $info); } } diff --git a/Controller.php b/Controller.php index c54bc82..bc3425e 100644 --- a/Controller.php +++ b/Controller.php @@ -62,7 +62,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var \string * @since 1.0.0 */ - protected static $module = 'Billing'; + const MODULE_NAME = 'Billing'; /** * Localization files. @@ -71,7 +71,7 @@ class Controller extends ModuleAbstract implements WebInterface * @since 1.0.0 */ protected static $localization = [ - RequestDestination::BACKEND => ['backend'], + RequestDestination::BACKEND => [''], ]; /** @@ -80,9 +80,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var \string * @since 1.0.0 */ - protected static $providing = [ - 'Content', - ]; + protected static $providing = []; /** * Dependencies. @@ -119,7 +117,7 @@ class Controller extends ModuleAbstract implements WebInterface public function viewBillingInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface { $view = new View($this->app, $request, $response); - $view->setTemplate('/Modules/Billing/Theme/backend/invoice-list'); + $view->setTemplate('/Modules/Billing/Theme/Backend/invoice-list'); $view->addData('nav', $this->createNavigation(1005104001, $request, $response)); return $view; @@ -138,7 +136,7 @@ class Controller extends ModuleAbstract implements WebInterface public function viewBillingInvoiceCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface { $view = new View($this->app, $request, $response); - $view->setTemplate('/Modules/Billing/Theme/backend/invoice-create'); + $view->setTemplate('/Modules/Billing/Theme/Backend/invoice-create'); $view->addData('nav', $this->createNavigation(1005104001, $request, $response)); return $view; @@ -157,7 +155,7 @@ class Controller extends ModuleAbstract implements WebInterface public function viewBillingPurchaInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface { $view = new View($this->app, $request, $response); - $view->setTemplate('/Modules/Billing/Theme/backend/purchase-invoice-list'); + $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-invoice-list'); $view->addData('nav', $this->createNavigation(1005104001, $request, $response)); return $view; @@ -177,7 +175,7 @@ class Controller extends ModuleAbstract implements WebInterface { $nav = Navigation::getInstance($request, $this->app->dbPool); $navView = new NavigationView($this->app, $request, $response); - $navView->setTemplate('/Modules/Navigation/Theme/backend/mid'); + $navView->setTemplate('/Modules/Navigation/Theme/Backend/mid'); $navView->setNav($nav->getNav()); $navView->setLanguage($request->getL11n()->language); $navView->setParent($pageId); diff --git a/Theme/lang/nav.backend.en.lang.php b/Theme/backend/Lang/Navigation.en.lang.php similarity index 100% rename from Theme/lang/nav.backend.en.lang.php rename to Theme/backend/Lang/Navigation.en.lang.php diff --git a/Theme/lang/backend.en.lang.php b/Theme/backend/Lang/en.lang.php similarity index 100% rename from Theme/lang/backend.en.lang.php rename to Theme/backend/Lang/en.lang.php diff --git a/info.json b/info.json index 89fcf34..777bb85 100644 --- a/info.json +++ b/info.json @@ -37,7 +37,7 @@ "type": 5, "from": "Billing", "for": "Navigation", - "file": "nav.backend" + "file": "Navigation" }, { "pid": [ @@ -46,7 +46,7 @@ ], "type": 5, "for": "Content", - "file": "backend", + "file": "", "from": "Billing" } ]