resolve deprecated form stuff

This commit is contained in:
Gregor Harlan 2016-02-11 21:33:19 +01:00
commit 8b4cd94db8
7 changed files with 104 additions and 88 deletions

View file

@ -19,9 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolverInterface;
*/
abstract class BaseAbstractType extends AbstractType
{
protected $options = array(
'name' => '',
);
protected $options = array();
public function __construct($mergeOptions = null)
{
@ -63,17 +61,11 @@ abstract class BaseAbstractType extends AbstractType
$resolver->setDefaults($this->options);
}
// BC for SF < 2.7
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$this->configureOptions($resolver);
}
/**
* {@inheritdoc}
*/
public function getName()
{
return $this->getOption('name');
return get_class($this);
}
}