Skip to content

[3.0] Added getBlockPrefix to FormTypeInterface #16724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ public function getLoader(ObjectManager $manager, $queryBuilder, $class)
return new ORMQueryBuilderLoader($queryBuilder);
}

/**
* {@inheritdoc}
*/
public function getName()
{
return $this->getBlockPrefix();
}

/**
* {@inheritdoc}
*/
Expand Down
7 changes: 1 addition & 6 deletions src/Symfony/Component/Form/AbstractType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ public function configureOptions(OptionsResolver $resolver)
}

/**
* 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()
{
Expand Down
10 changes: 10 additions & 0 deletions src/Symfony/Component/Form/FormTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ public function finishView(FormView $view, FormInterface $form, array $options);
*/
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.
*
Expand Down