Skip to content

Commit

Permalink
[Backoffice] Remove deprecated warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoUseFreak committed Oct 17, 2015
1 parent 3d13d7d commit 4966069
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
13 changes: 7 additions & 6 deletions src/Clastic/BackofficeBundle/Form/Type/EntityHiddenType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Clastic\BackofficeBundle\Form\DataTransformer\EntityToIdTransformer;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\Common\Persistence\ObjectManager;

Expand Down Expand Up @@ -44,17 +45,17 @@ public function buildForm(FormBuilderInterface $builder, array $options)
}

/**
* @param OptionsResolverInterface $resolver
* {@inheritdoc}
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function configureOptions(OptionsResolver $resolver)
{
$resolver
->setRequired(array('class'))
->setDefaults(array(
->setRequired(['class'])
->setDefaults([
'invalid_message' => 'The entity does not exist.',
))
;
]);
}

public function getParent()
{
return 'hidden';
Expand Down
7 changes: 4 additions & 3 deletions src/Clastic/BackofficeBundle/Form/Type/FieldsetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

/**
Expand All @@ -22,11 +23,11 @@ class FieldsetType extends FormType
/**
* {@inheritdoc}
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'legend' => '',
'virtual' => true,
'legend' => '',
'inherit_data' => true,
));
}

Expand Down

0 comments on commit 4966069

Please sign in to comment.