Development

Changeset 7959

You must first sign up to be able to contribute.

Changeset 7959

Show
Ignore:
Timestamp:
03/19/08 05:37:43 (7 months ago)
Author:
dwhittle
Message:

1.1: tweaked decorator handling (removed redundant call and moved to config handler)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/config/sfViewConfigHandler.class.php

    r7899 r7959  
    162162  { 
    163163    $data = ''; 
    164  
    165164    if ($this->getConfigValue('has_layout', $viewName) && false !== $layout = $this->getConfigValue('layout', $viewName)) 
    166165    { 
    167       $data = "  \$this->setDecoratorTemplate('$layout'.\$this->getExtension());\n"; 
     166      // decorator configuration 
     167      $data .= "  \$this->setDecoratorTemplate(sfConfig::get('symfony.view.'.\$this->moduleName.'_'.\$this->actionName.'_layout', '$layout'.\$this->getExtension()));\n"; 
    168168    } 
    169169 
     
    171171    // So, we check if the user requested has_layout: true or if he gave a layout: name for this particular action 
    172172    $localLayout = isset($this->yamlConfig[$viewName]['layout']) || isset($this->yamlConfig[$viewName]['has_layout']); 
    173     if (!$localLayout && $data
     173    if (!$localLayout && isset($data)
    174174    { 
    175175      $data = "  if (!\$this->context->getRequest()->isXmlHttpRequest())\n  {\n  $data  }\n"; 
  • branches/1.1/lib/view/sfPHPView.class.php

    r7951 r7959  
    106106    require($this->context->getConfigCache()->checkConfig('modules/'.$this->moduleName.'/config/view.yml')); 
    107107 
    108     // decorator configuration 
    109     $this->setDecoratorTemplate(sfConfig::get('symfony.view.'.$this->moduleName.'_'.$this->actionName.'_layout')); 
    110  
    111108    // set template directory 
    112109    if (!$this->directory) 
  • branches/1.1/lib/view/sfView.class.php

    r7846 r7959  
    129129    $this->parameterHolder->add(sfConfig::get('mod_'.strtolower($moduleName).'_view_param', array())); 
    130130 
    131     $this->decoratorDirectory = sfConfig::get('sf_app_template_dir'); 
    132  
    133131    // include view configuration 
    134132    $this->configure();