Skip to content

RFI: TModule::init loads [configuration] behaviors. #971

@belisoful

Description

@belisoful

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions