Development

Changeset 3325

You must first sign up to be able to contribute.

Changeset 3325

Show
Ignore:
Timestamp:
01/22/07 16:42:47 (2 years ago)
Author:
fabien
Message:

better inheritance for admin generator templates (no need to copy all templates files for a new theme)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/generator/sfCrudGenerator.class.php

    r3302 r3325  
    8787 
    8888    $this->setTheme($theme); 
    89     $templateFiles = sfFinder::type('file')->name('*.php')->relative()->in($themeDir.'/templates'); 
    90     $configFiles = sfFinder::type('file')->name('*.yml')->relative()->in($themeDir.'/config'); 
     89 
     90    $templateFiles = array_merge( 
     91      sfFinder::type('file')->name('*.php')->relative()->in(sfLoader::getGeneratorTemplate($this->getGeneratorClass(), 'default', '').'/templates'), 
     92      sfFinder::type('file')->name('*.php')->relative()->in($themeDir.'/templates') 
     93    ); 
     94 
     95    $configFiles = array_merge( 
     96      sfFinder::type('file')->name('*.yml')->relative()->in(sfLoader::getGeneratorTemplate($this->getGeneratorClass(), 'default', '').'/config'), 
     97      sfFinder::type('file')->name('*.yml')->relative()->in($themeDir.'/config') 
     98    ); 
    9199 
    92100    $this->generatePhpFiles($this->generatedModuleName, $templateFiles, $configFiles);