Created
March 25, 2014 15:48
-
-
Save florinutz/9764709 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
// florin 3/25/14 2:16 PM | |
namespace Wyzbiz\Bundle\MainBundle\Form\Extension; | |
use Symfony\Component\Form\AbstractTypeExtension; | |
use Symfony\Component\Form\FormView; | |
use Symfony\Component\Form\FormInterface; | |
use Symfony\Component\PropertyAccess\PropertyAccess; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
class ModelListExtension extends AbstractTypeExtension | |
{ | |
public function getExtendedType() | |
{ | |
return 'sonata_type_model_list'; | |
} | |
/** | |
* Add the multiple option | |
* | |
* @param OptionsResolverInterface $resolver | |
*/ | |
public function setDefaultOptions(OptionsResolverInterface $resolver) | |
{ | |
$resolver->setOptional(array('multiple')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment