Skip to content

Instantly share code, notes, and snippets.

@johnkary
Forked from jmather/entity.php
Created November 2, 2012 20:39
Show Gist options
  • Save johnkary/4004186 to your computer and use it in GitHub Desktop.
Save johnkary/4004186 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