Skip to content

Instantly share code, notes, and snippets.

@andreia
Created January 4, 2011 13:06
Show Gist options
  • Save andreia/764742 to your computer and use it in GitHub Desktop.
Save andreia/764742 to your computer and use it in GitHub Desktop.
<?php
class MyFormFilter extends BaseMyFormFilter{
public function configure(){
$this->widgetSchema['areas_conhecimento'] =
new sfWidgetFormChoice(array(
'expanded' => true,
'choices' => Doctrine_Core::getTable('MyTable')->getAreasConhecimento(),
));
}
public function getFields(){
$fields = parent::getFields();
$fields['areas_conhecimento'] = 'ForeignKey';
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment