Use hook to redirect

This commit is contained in:
Abhishek Kumar
2023-11-09 13:02:02 +05:30
parent b2902a4c90
commit 73f36a3eb1
2 changed files with 4 additions and 28 deletions

View File

@@ -1,28 +0,0 @@
<?php
/**
* 2010-2023 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through LICENSE.txt file inside our module
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to CustomizationPolicy.txt file inside our module for more information.
*
* @author Webkul IN
* @copyright 2010-2023 Webkul IN
* @license LICENSE.txt
*/
class AdminHotelReservationSystemManagementController extends ModuleAdminController
{
public function __construct()
{
parent::__construct();
Tools::redirectAdmin($this->context->link->getAdminLink('AdminHotelRoomsBooking'));
}
}

View File

@@ -478,6 +478,10 @@ class HotelReservationSystem extends Module
public function hookDisplayBackOfficeHeader()
{
if (Tools::getValue('controllerUri') == 'AdminHotelReservationSystemManagement') {
Tools::redirectAdmin($this->context->link->getAdminLink('AdminHotelRoomsBooking'));
}
$this->context->controller->addCSS($this->_path.'views/css/admin/css/hotel_admin_tab_logo.css');
}