Ticket #668 (closed enhancement: fixed)
Allow customization of the way Actions, Views etc. are laid out in the filesystem
| Reported by: | david | Owned by: | david |
|---|---|---|---|
| Priority: | low | Milestone: | 1.0 |
| Component: | _OTHER_ | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Patch attached: | no |
Description (last modified by david) (diff)
so instead of
$file = AgaviConfig::get('core.module_dir') . '/' . $moduleName . '/actions/' . $actionName . 'Action.class.php';
in AgaviController::createActionInstance() we expand directives and variables on a string read from, say, "modules.modulename.agavi.action.path", that defaults to something like
%core.module_dir%/${moduleName}/actions/{$actionName}Action.class.php
So you could get rid of the separate folders for view, tpl etc per action by having something like
%core.module_dir%/${moduleName}/{$actionName}/Action.class.php
for the action,
%core.module_dir%/${moduleName}/{$actionName}/validate.xml
for the validation xml and so on.
All of this should be per-module, as otherwise, modules are not really interchangeable.
Difficult: the Views. They have a scheme like Default_Sub_MarineSuccessView, which won't work unless Marine and Success (in this example) are separate. That means we also need customization of the way a View shortname (Success) and an Action name are concatenated.
Also, template paths are defined through layouts, and handled in AgaviTemplateLayer classes, where we can only really adjust directory, not all targets, since those are defined globally.

