Skip to content

Instantly share code, notes, and snippets.

@jmather
Created November 2, 2012 15:05
Show Gist options
  • Save jmather/4001884 to your computer and use it in GitHub Desktop.
Save jmather/4001884 to your computer and use it in GitHub Desktop.
public static $types = array(
'a' => 'Option A',
'b' => 'Option B',
);
public static function getTypeChoices()
{
return self::$types;
}
->add('type', 'choice', array(
'choices' => \My\Bundle\AppBundle\Entity\Thing::getTypeChoices(),
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment