From 8f3dfb1ea8b236edcc973da6602bd3cc81ccaf03 Mon Sep 17 00:00:00 2001 From: Fran Moreno Date: Tue, 16 Feb 2021 01:55:07 +0100 Subject: [PATCH] Introduce TypeGuesserInterface This will guess the field description type from its properties. --- src/FieldDescription/TypeGuesserInterface.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/FieldDescription/TypeGuesserInterface.php diff --git a/src/FieldDescription/TypeGuesserInterface.php b/src/FieldDescription/TypeGuesserInterface.php new file mode 100644 index 00000000000..998e25a49ae --- /dev/null +++ b/src/FieldDescription/TypeGuesserInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Sonata\AdminBundle\FieldDescription; + +use Sonata\AdminBundle\Admin\FieldDescriptionInterface; +use Symfony\Component\Form\Guess\TypeGuess; + +interface TypeGuesserInterface +{ + public function guess(FieldDescriptionInterface $fieldDescription): TypeGuess; +}