feat(main): Add banner option

This commit is contained in:
2026-08-13 13:59:08 +02:00
parent fb641fc236
commit ce480314f3
22 changed files with 316 additions and 39 deletions
+4 -2
View File
@@ -3,6 +3,7 @@
namespace Websmid\CustomHtml\Module;
use Websmid\CustomHtml\Config\Config;
use PrestaShop\PrestaShop\Adapter\SymfonyContainer;
use PrestaShop\PrestaShop\Core\Grid\Data\GridData;
use PrestaShop\PrestaShop\Core\Grid\Record\RecordCollection;
use Tools;
@@ -21,9 +22,10 @@ trait AdminHooks
public function hookActionAdminControllerSetMedia(): void
{
$controllerName = $this->context->controller->controller_name ?? '';
$request = SymfonyContainer::getInstance()->get('request_stack')->getCurrentRequest();
$routeName = $request ? (string) $request->attributes->get('_route') : '';
if (!in_array($controllerName, Config::ADMIN_CONTROLLERS, true)) {
if (0 !== strpos($routeName, 'customhtml')) {
return;
}