Ticket #388: patch-custom-view-class.diff
| File patch-custom-view-class.diff, 0.8 kB (added by juan.cataldo@gmail.com, 3 years ago) |
|---|
-
sfController.class.php
old new 471 471 472 472 // view class (as configured in module.yml or defined in action) 473 473 $viewName = $this->getContext()->getRequest()->getAttribute($moduleName.'_'.$actionName.'_view_name', '', 'symfony/action/view') ? $this->getContext()->getRequest()->getAttribute($moduleName.'_'.$actionName.'_view_name', '', 'symfony/action/view') : sfConfig::get('mod_'.strtolower($moduleName).'_view_class'); 474 $file = sfConfig::get('sf_symfony_lib_dir').'/view/'.$viewName.'View.class.php';475 if (is_readable($file))476 {477 $class = $viewName.'View';478 474 479 return new $class(); 480 } 475 $class = $viewName.'View'; 476 477 return new $class(); 481 478 } 482 479 483 480 /**