After studying other platforms a bit, It would be nice to be able to define behaviors within the configuration of a module rather than from an instance of TBehaviorsModule.
Proposal: TModule::init($config) is expanded to read $config for <behavior class='xyz' /> and $config['behaviors'] => behavior|array[behavior]. a behavior is a TBaseBehavior subclass or a string class name or an array for Prado::createComponent.
This will add behaviors to modules. This does replicate the function of TBehaviorModule, but in a way similar to Yii. Also, if modules are getting behavior support, then the main application (and the application configuration) should also get behaviors that apply to the application.
behaviors could also be a page level selection configuration.
After studying other platforms a bit, It would be nice to be able to define behaviors within the configuration of a module rather than from an instance of TBehaviorsModule.
Proposal:
TModule::init($config)is expanded to read $config for<behavior class='xyz' />and$config['behaviors'] => behavior|array[behavior]. abehavioris a TBaseBehavior subclass or a string class name or an array for Prado::createComponent.This will add behaviors to modules. This does replicate the function of TBehaviorModule, but in a way similar to Yii. Also, if modules are getting behavior support, then the main application (and the application configuration) should also get behaviors that apply to the application.
behaviors could also be a page level selection configuration.