Direkt zur Hauptnavigation springen Direkt zum Inhalt springen
Alle Beiträge

symfony: Creating a custom form generator by making sfDoctrineFormGenerator.class themable

Obviously the sfDoctrineFormGenerator.class extends the sfGenerator.class, but there is actually no way to set a parameter to call a custom form generator and this feature will come in the 2.0 release . So you have to set the parameter by hand in the sfDoctrineFormGenerator.class.php:


public function initialize(sfGeneratorManager $generatorManager)

{

parent::initialize($generatorManager);

$this->getPluginModels();

$this->setGeneratorClass('sfDoctrineForm');

$this->setTheme(sfConfig::get("formgenerator_theme","default"));

}

You have to set the "formgenerator_theme" setting in your ProjectConfiguration.class.php