protected function addField($name) { switch ($name) { case 'taxonomy': $choices = array(); $choices[null] = null; foreach (QubitTaxonomy::getEditableTaxonomies() as $taxonomy) { $choices[$this->context->routing->generate(null, array($taxonomy, 'module' => 'taxonomy'))] = $taxonomy; } $this->form->setDefault($name, null); $this->form->setValidator($name, new sfValidatorString()); $this->form->setWidget($name, new sfWidgetFormSelect(array('choices' => $choices))); break; } }