Created
February 4, 2013 23:01
-
-
Save slave2zeros/4710568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Eduguide\CheersBundle\Form\Type; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
class CheerGiftFormType extends AbstractType | |
{ | |
private $giftChoices; | |
public function __construct(array $giftChoices) { | |
$this->giftChoices = $giftChoices; | |
} | |
public function setDefaultOptions(OptionsResolverInterface $resolver) | |
{ | |
$resolver->setDefaults(array( | |
'choices' => $this->giftChoices, | |
'expanded' => true | |
)); | |
} | |
public function getParent() | |
{ | |
return 'choice'; | |
} | |
public function getName() | |
{ | |
return 'cheer_gift'; | |
} | |
} |
jkm9000
commented
Feb 4, 2013
setDefaults(array(
'expanded' => true
));
}
public function getParent()
{
return 'choice';
}
public function getName()
{
return 'cheer_gift';
}
```
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment