Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Allow modules to override module admin and front controllers #894

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

abhishek-webkul
Copy link
Contributor

@abhishek-webkul abhishek-webkul commented Jan 8, 2024

This PR allows modules to override admin and front controllers of existing modules.

Following examples are for module mydemomodule:

1. Overridding module admin controller

To override admin controller AdminAddHotelController of module hotelreservationsystem you need to create file mydemomodule/override/modules/hotelreservationsystem/controllers/admin/AdminAddHotelController.php

Override class AdminAddHotelController as:

class AdminAddHotelControllerOverride extends AdminAddHotelController
{
    // define overridden properties, constants and/or methods
}

1. Overridding module front controller

To override front controller Payment of module bankwire you need to create file mydemomodule/override/modules/bankwire/controllers/front/payment.php

Override class BankwirePaymentModuleFrontController as:

class BankwirePaymentModuleFrontControllerOverride extends BankwirePaymentModuleFrontController
{
    // define overridden properties, constants and/or methods
}

@abhishek-webkul abhishek-webkul changed the title Added: Allow modules to override module front and admin controllers Added: Allow modules to override module admin and front controllers Jan 18, 2024
@rohit053 rohit053 merged commit ff7229b into Qloapps:develop Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants