You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Maybe there could be a protected TModule::getModuleBehaviorObject() {return $this;}. This way a module (ahem: TDataSourceConfig) a module can route a module's configuration behaviors to a managed object, like TDbConnection.
module configuration of behaviors should be in a function by itself. If managed objects are lazy loaded, the behaviors can be "not applied", but stored, and attached when the lazy loading object is loaded.
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]
. abehavior
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.
The text was updated successfully, but these errors were encountered: