From d834cd3d680ba937d96235905523f518c584b2d1 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 28 Nov 2015 12:15:28 +0100 Subject: [PATCH] Added getBlockPrefix to FormTypeInterface --- src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php | 8 -------- src/Symfony/Component/Form/AbstractType.php | 7 +------ src/Symfony/Component/Form/FormTypeInterface.php | 10 ++++++++++ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php index 9ee98c7327..f0c8a9e785 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php @@ -56,14 +56,6 @@ class EntityType extends DoctrineType return new ORMQueryBuilderLoader($queryBuilder); } - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->getBlockPrefix(); - } - /** * {@inheritdoc} */ diff --git a/src/Symfony/Component/Form/AbstractType.php b/src/Symfony/Component/Form/AbstractType.php index 9be91dfced..e99f1073b1 100644 --- a/src/Symfony/Component/Form/AbstractType.php +++ b/src/Symfony/Component/Form/AbstractType.php @@ -48,12 +48,7 @@ abstract class AbstractType implements FormTypeInterface } /** - * Returns the prefix of the template block name for this type. - * - * The block prefixes default to the underscored short class name with - * the "Type" suffix removed (e.g. "UserProfileType" => "user_profile"). - * - * @return string The prefix of the template block name + * {@inheritdoc} */ public function getBlockPrefix() { diff --git a/src/Symfony/Component/Form/FormTypeInterface.php b/src/Symfony/Component/Form/FormTypeInterface.php index 584e650a1d..1e80f477ca 100644 --- a/src/Symfony/Component/Form/FormTypeInterface.php +++ b/src/Symfony/Component/Form/FormTypeInterface.php @@ -75,6 +75,16 @@ interface FormTypeInterface */ public function configureOptions(OptionsResolver $resolver); + /** + * Returns the prefix of the template block name for this type. + * + * The block prefix defaults to the underscored short class name with + * the "Type" suffix removed (e.g. "UserProfileType" => "user_profile"). + * + * @return string The prefix of the template block name + */ + public function getBlockPrefix(); + /** * Returns the name of the parent type. *