contao/test — Issue #962: Change Backend class behaviour
Author: importer
Created: 2011-11-28 17:44:00+00:00
State: open
Labels: backend, Feature

I wonder if it's possible to change the behaviour of Backend's getBackendModule, currently it does:

1. handles ajax request
2. calls 'callback' defined in module configuration (config.php)
3. check if a 'key' param exists and if the related entry is set in module configuration (config.php)
4. calls the default actions (e.g. 'showAll' or that defined in 'act' param)

I think that swapping of 2 and 3 is a good idea; this way a developer can mantain its code more 'clean'

//config.php entry for module

'mymodule' => array(
'callback' => 'MyCustomModuleHome',
'myAction' => array('MyCustomModuleAction', 'myAction')
);

currently the above configuration never calls MyCustomModuleAction->myAction() because module configuration contains a 'callback' entry (step 2 of the above list)

I hope is clear what I mean

[Download the attachments](http://www.contao.org/tl_files/tickets/962.zip "Download the attachments of this ticket")

--- _Originally created by ga.n on August 21st, 2009, at 08:31am (ID 962)_