Skip to content

Commit

Permalink
Implement getExtendedTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Apr 2, 2020
1 parent 37c0ca0 commit c17d071
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Extension/Http/FormTypeHttpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\RequestHandlerInterface;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\FormType;

class FormTypeHttpExtension extends AbstractTypeExtension
{
Expand Down Expand Up @@ -32,6 +33,14 @@ public function buildForm(FormBuilderInterface $builder, array $options)
*/
public function getExtendedType()
{
return 'Symfony\Component\Form\Extension\Core\Type\FormType';
return FormType::class;
}

/**
* {@inheritdoc}
*/
public static function getExtendedTypes(): iterable
{
return [FormType::class];
}
}
8 changes: 8 additions & 0 deletions src/Extension/Session/CsrfTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,12 @@ public function getExtendedType()
{
return FormType::class;
}

/**
* {@inheritdoc}
*/
public static function getExtendedTypes(): iterable
{
return [FormType::class];
}
}
8 changes: 8 additions & 0 deletions src/Extension/Session/SessionTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,12 @@ public function getExtendedType()
{
return FormType::class;
}

/**
* {@inheritdoc}
*/
public static function getExtendedTypes(): iterable
{
return [FormType::class];
}
}
8 changes: 8 additions & 0 deletions src/Extension/Validation/ValidationTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,12 @@ public function getExtendedType()
{
return FormType::class;
}

/**
* {@inheritdoc}
*/
public static function getExtendedTypes(): iterable
{
return [FormType::class];
}
}

0 comments on commit c17d071

Please sign in to comment.