Added getBlockPrefix to FormTypeInterface

This commit is contained in:
WouterJ 2015-11-28 12:15:28 +01:00
parent 7ba5f7acb3
commit d834cd3d68
3 changed files with 11 additions and 14 deletions

View File

@ -56,14 +56,6 @@ class EntityType extends DoctrineType
return new ORMQueryBuilderLoader($queryBuilder);
}
/**
* {@inheritdoc}
*/
public function getName()
{
return $this->getBlockPrefix();
}
/**
* {@inheritdoc}
*/

View File

@ -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()
{

View File

@ -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.
*