Development

Changeset 11482

You must first sign up to be able to contribute.

Changeset 11482

Show
Ignore:
Timestamp:
09/12/08 17:44:35 (2 months ago)
Author:
FabianLange
Message:

[1.2] added param to specify a custom view_class for partials called: ´partial_view_class´. Added first basic test for PartialHelper?. closes #2035

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/helper/PartialHelper.php

    r10227 r11482  
    211211  $actionName = '_'.$templateName; 
    212212 
    213   $view = new sfPartialView($context, $moduleName, $actionName, ''); 
     213  $class = sfConfig::get('mod_'.$moduleName.'_partial_view_class', 'sf').'PartialView'; 
     214  $view = new $class($context, $moduleName, $actionName, ''); 
    214215  $view->setPartialVars($vars); 
    215216 
  • doc/branches/1.2/book/06-Inside-the-Controller-Layer.txt

    r11250 r11482  
    10351035Listing 6-36 - Module Configuration, in `apps/frontend/modules/mymodule/config/module.yml` 
    10361036 
    1037     all:                 # For all environments 
    1038       enabled:     true 
    1039       is_internal: false 
    1040       view_class:  sfPHP 
     1037    all:                  # For all environments 
     1038      enabled:            true 
     1039      is_internal:        false 
     1040      view_class:         sfPHP 
     1041      partial_view_class: sf 
    10411042 
    10421043The 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`). 
     
    10451046 
    10461047The `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. 
     1048 
     1049The `partial_view_class` parameter defines the view class used for partials of this module. It must inherit from `sfPartialView`. 
    10471050 
    10481051Summary