When a user requests a module declared as disabled in /apps/frontend/modules/mymodule/config/module.yml, symfony tries to access to the default/disabled action.
To customize the "This Module is Unavailable" page, add the executeDisabled() method in the apps/frontend/modules/default/actions/actions.class.php file:
/**
* Module disabled
*
*/
public function executeDisabled()
{
}
Then create the apps/frontend/modules/default/templates/disabledSuccess.php template.
If you want, you can grab the original file and modify it.
In one of your modules, add in apps/frontend/modules/yourModule/config/module.yml:
all:
enabled: false
default module is protectedMake sure to un-secure the disabled action in apps/frontend/modules/default/config/security.yml:
disabled:
is_secure: off
If you want to use an other module, modify apps/frontend/config/settings.yml:
all:
.actions:
module_disabled_module: foo # To be called when a user requests
module_disabled_action: bar # A module disabled in the module.yml
Clear your cache.
php symfony cc
Powered by jQuery UI and symfony. symfony check is an UI Studio creation
The content this site is published under a Creative Commons License. Some parts of the content are a remix of the official symfony documentation.
Illustrations drawned by the talented Pierre Brillault, all rights reserved.
