show warning on activation if asset files doesn't exist
This commit is contained in:
parent
154a28f118
commit
4b47e5ddb6
@ -46,6 +46,8 @@ php composer require d3/oxid-debugbar:^1.0
|
|||||||
|
|
||||||
If necessary, please confirm that you allow `composer-symlinker` and `composer-patches` to execute code.
|
If necessary, please confirm that you allow `composer-symlinker` and `composer-patches` to execute code.
|
||||||
|
|
||||||
|
Have the files of the package `oxid-esales/oxideshop-ce` overwritten.
|
||||||
|
|
||||||
Activate the module in Shopadmin under "Extensions -> Modules".
|
Activate the module in Shopadmin under "Extensions -> Modules".
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
@ -46,6 +46,8 @@ php composer require d3/oxid-debugbar:^1.0
|
|||||||
|
|
||||||
Sofern nötig, bestätigen Sie bitte, dass Sie `composer-symlinker` und `composer-patches` erlauben, Code auszuführen.
|
Sofern nötig, bestätigen Sie bitte, dass Sie `composer-symlinker` und `composer-patches` erlauben, Code auszuführen.
|
||||||
|
|
||||||
|
Lassen Sie die Dateien des Paketes `oxid-esales/oxideshop-ce` überschreiben.
|
||||||
|
|
||||||
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
|
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
|
||||||
|
|
||||||
## Verwendung
|
## Verwendung
|
||||||
|
53
Setup/Events.php
Normal file
53
Setup/Events.php
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*
|
||||||
|
* https://www.d3data.de
|
||||||
|
*
|
||||||
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
|
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
|
* @link https://www.oxidmodule.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace D3\DebugBar\Setup;
|
||||||
|
|
||||||
|
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
|
||||||
|
use D3\ModCfg\Application\Model\Install\d3install;
|
||||||
|
use Doctrine\DBAL\DBALException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\SystemComponentException;
|
||||||
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
|
||||||
|
class Events
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @throws d3ShopCompatibilityAdapterException
|
||||||
|
* @throws DBALException
|
||||||
|
* @throws DatabaseConnectionException
|
||||||
|
* @throws DatabaseErrorException
|
||||||
|
* @throws StandardException
|
||||||
|
* @throws SystemComponentException
|
||||||
|
*/
|
||||||
|
public static function onActivate()
|
||||||
|
{
|
||||||
|
if (false === file_exists(
|
||||||
|
rtrim(Registry::getConfig()->getConfigParam('sShopDir'), '/').'/out/debugbar/debugbar.jas'
|
||||||
|
)) {
|
||||||
|
Registry::getUtilsView()->addErrorToDisplay(
|
||||||
|
'The asset files cannot be found. Have you forgotten an installation step described in <a href="https://git.d3data.de/D3Public/DebugBar/src/branch/main/README.en.md">README</a>? Then please run the installation again.'.
|
||||||
|
nl2br(PHP_EOL.PHP_EOL).
|
||||||
|
'Die Assetdateien können nicht gefunden werden. Hast Du einen Installationsschritt vergessen, der in <a href="https://git.d3data.de/D3Public/DebugBar/src/branch/main/README.md">README</a> beschrieben ist? Dann führe die Installation bitte noch einmal aus.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function onDeactivate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
2
ToDo.md
2
ToDo.md
@ -3,4 +3,4 @@
|
|||||||
- clear tpl cache button
|
- clear tpl cache button
|
||||||
- phpinfo() overview
|
- phpinfo() overview
|
||||||
- automatic switch between Smarty and Twig
|
- automatic switch between Smarty and Twig
|
||||||
- displayed in live shop when logged in as admin
|
- displayed in live shop when logged in as admin
|
||||||
|
@ -42,7 +42,9 @@ $aModule = [
|
|||||||
Config::class => Config_DebugBar::class,
|
Config::class => Config_DebugBar::class,
|
||||||
ShopControl::class => ShopControl_DebugBar::class,
|
ShopControl::class => ShopControl_DebugBar::class,
|
||||||
],
|
],
|
||||||
'events' => [],
|
'events' => [
|
||||||
|
'onActivate' => '\D3\DebugBar\Setup\Events::onActivate',
|
||||||
|
],
|
||||||
'templates' => [],
|
'templates' => [],
|
||||||
'settings' => [],
|
'settings' => [],
|
||||||
'blocks' => [],
|
'blocks' => [],
|
||||||
|
Loading…
Reference in New Issue
Block a user