A few module behaviors rely on configuration. To modify them, you must create a module.yml
file in the module's config/
directory and define settings on a per-environment basis (or under the all:
header for all environments). Listing 6-36 shows an example of a module.yml
file for the mymodule
module.
Listing 6-36 - Module Configuration, in apps/frontend/modules/mymodule/config/module.yml
all: # For all environments
enabled: true
is_internal: false
view_class: sfPHP
partial_view_class: sf
The enabled parameter allows you to disable all actions of a module. All actions are redirected to the module_disabled_module
/module_disabled_action
action (as defined in settings.yml
).
The is_internal
parameter allows you to restrict the execution of all actions of a module to internal calls. For example, this is useful for mail actions that you must be able to call from another action, to send an e-mail message, but not from the outside.
The view_class
parameter defines the view class. It must inherit from sfView
. Overriding this value allows you to use other view systems, with other templating engines, such as Smarty.
The partial_view_class
parameter defines the view class used for partials of this module. It must inherit from sfPartialView
.