8000 feature #16724 [3.0] Added getBlockPrefix to FormTypeInterface (WouterJ) · symfony/symfony@f2ee561 · GitHub
[go: up one dir, main page]

Skip to content

Commit f2ee561

Browse files
committed
feature #16724 [3.0] Added getBlockPrefix to FormTypeInterface (WouterJ)
This PR was merged into the 3.0-dev branch. Discussion ---------- [3.0] Added getBlockPrefix to FormTypeInterface | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- d834cd3 Added getBlockPrefix to FormTypeInterface
2 parents 4e1effe + d834cd3 commit f2ee561

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ public function getLoader(ObjectManager $manager, $queryBuilder, $class)
5656
return new ORMQueryBuilderLoader($queryBuilder);
5757
}
5858

59-
/**
60-
* {@inheritdoc}
61-
*/
62-
public function getName()
63-
{
64-
return $this->getBlockPrefix();
65-
}
66-
6759
/**
6860
* {@inheritdoc}
6961
*/

src/Symfony/Component/Form/AbstractType.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ public function configureOptions(OptionsResolver $resolver)
4848
}
4949

5050
/**
51-
* Returns the prefix of the template block name for this type.
52-
*
53-
* The block prefixes default to the underscored short class name with
54-
* the "Type" suffix removed (e.g. "UserProfileType" => "user_profile").
55-
*
56-
* @return string The prefix of the template block name
51+
* {@inheritdoc}
5752
*/
5853
public function getBlockPrefix()
5954
{

src/Symfony/Component/Form/FormTypeInterface.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ public function finishView(FormView $view, FormInterface $form, array $options);
7575
*/
7676
public function configureOptions(OptionsResolver $resolver);
7777

78+
/**
79+
* Returns the prefix of the template block name for this type.
80+
*
81+
* The block prefix defaults to the underscored short class name with
82+
* the "Type" suffix removed (e.g. "UserProfileType" => "user_profile").
83+
*
84+
* @return string The prefix of the template block name
85+
*/
86+
public function getBlockPrefix();
87+
7888
/**
7989
* Returns the name of the parent type.
8090
*

0 commit comments

Comments
 (0)
0