Permalink
Browse files

Make BlockAdapterFormType extend AbstractType

  • Loading branch information...
rvanlaarhoven committed Jan 29, 2016
1 parent d2f9f16 commit 11035f647c2481a54082c24ea200a698968d554e
Showing with 5 additions and 30 deletions.
  1. +5 −30 Form/Type/BlockAdapterFormType.php
@@ -3,6 +3,8 @@
namespace Opifer\ContentBundle\Form\Type;
use Opifer\ContentBundle\Block\Service\BlockServiceInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormTypeInterface;
@@ -15,7 +17,7 @@
*
* @package Opifer\Form\Type
*/
class BlockAdapterFormType implements FormTypeInterface
class BlockAdapterFormType extends AbstractType
{
/** @var BlockServiceInterface */
protected $blockService;
@@ -36,34 +38,6 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$this->blockService->buildManageForm($builder, $options);
}
/**
* {@inheritdoc}
*/
public function buildView(FormView $view, FormInterface $form, array $options)
{
//$this->blockService->buildManageView($view, $form, $options);
}
/**
* {@inheritdoc}
*/
public function finishView(FormView $view, FormInterface $form, array $options)
{
//$this->blockService->finishManage($view, $form, $options);
}
/**
* {@inheritdoc}
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
if (!$resolver instanceof OptionsResolver) {
throw new \InvalidArgumentException(sprintf('Custom resolver "%s" must extend "Symfony\Component\OptionsResolver\OptionsResolver".', get_class($resolver)));
}
$this->configureOptions($resolver);
}
/**
* Configures the options for this type.
*
@@ -79,8 +53,9 @@ public function configureOptions(OptionsResolver $resolver)
*/
public function getParent()
{
return 'form';
return FormType::class;
}
/**
* {@inheritdoc}
*/

0 comments on commit 11035f6

Please sign in to comment.