From c17d071a63dda9d92ef1e3149c6e018ac31fb669 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Thu, 2 Apr 2020 16:06:40 +0200 Subject: [PATCH] Implement getExtendedTypes --- src/Extension/Http/FormTypeHttpExtension.php | 11 ++++++++++- src/Extension/Session/CsrfTypeExtension.php | 8 ++++++++ src/Extension/Session/SessionTypeExtension.php | 8 ++++++++ src/Extension/Validation/ValidationTypeExtension.php | 8 ++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Extension/Http/FormTypeHttpExtension.php b/src/Extension/Http/FormTypeHttpExtension.php index 3b28dd3..b60b5c6 100644 --- a/src/Extension/Http/FormTypeHttpExtension.php +++ b/src/Extension/Http/FormTypeHttpExtension.php @@ -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 { @@ -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]; } } diff --git a/src/Extension/Session/CsrfTypeExtension.php b/src/Extension/Session/CsrfTypeExtension.php index 5a347f5..6e8d9ac 100644 --- a/src/Extension/Session/CsrfTypeExtension.php +++ b/src/Extension/Session/CsrfTypeExtension.php @@ -37,4 +37,12 @@ public function getExtendedType() { return FormType::class; } + + /** + * {@inheritdoc} + */ + public static function getExtendedTypes(): iterable + { + return [FormType::class]; + } } diff --git a/src/Extension/Session/SessionTypeExtension.php b/src/Extension/Session/SessionTypeExtension.php index 3a88c6b..bba6fdc 100644 --- a/src/Extension/Session/SessionTypeExtension.php +++ b/src/Extension/Session/SessionTypeExtension.php @@ -33,4 +33,12 @@ public function getExtendedType() { return FormType::class; } + + /** + * {@inheritdoc} + */ + public static function getExtendedTypes(): iterable + { + return [FormType::class]; + } } diff --git a/src/Extension/Validation/ValidationTypeExtension.php b/src/Extension/Validation/ValidationTypeExtension.php index 3ddac71..941b4ce 100644 --- a/src/Extension/Validation/ValidationTypeExtension.php +++ b/src/Extension/Validation/ValidationTypeExtension.php @@ -99,4 +99,12 @@ public function getExtendedType() { return FormType::class; } + + /** + * {@inheritdoc} + */ + public static function getExtendedTypes(): iterable + { + return [FormType::class]; + } }