8000 [Form] Added getBlockPrefix() to ResolvedFormTypeInterface · symfony/symfony@7e89345 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e89345

Browse files
committed
[Form] Added getBlockPrefix() to ResolvedFormTypeInterface
1 parent ab2044f commit 7e89345

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,12 @@ public function __construct(ResolvedFormTypeInterface $proxiedType, FormDataColl
4343
$this->dataCollector = $dataCollector;
4444
}
4545

46-
/**
47-
* {@inheritdoc}
48-
*/
49-
public function getName()
50-
{
51-
return $this->proxiedType->getName();
52-
}
53-
5446
/**
5547
* {@inheritdoc}
5648
*/
5749
public function getBlockPrefix()
5850
{
59-
return method_exists($this->proxiedType, 'getBlockPrefix') ? $this->proxiedType->getBlockPrefix() : $this->getName();
51+
return $this->proxiedType->getBlockPrefix();
6052
}
6153

6254
/**

src/Symfony/Component/Form/ResolvedFormType.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ public function __construct(FormTypeInterface $innerType, array $typeExtensions
5656
}
5757

5858
/**
59-
* Returns the prefix of the template block name for this type.
60-
*
61-
* @return string The prefix of the template block name
59+
* {@inheritdoc}
6260
*/
6361
public function getBlockPrefix()
6462
{

src/Symfony/Component/Form/ResolvedFormTypeInterface.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
*/
2121
interface ResolvedFormTypeInterface
2222
{
23+
/**
24+
* Returns the prefix of the template block name for this type.
25+
*
26+
* @return string The prefix of the template block name
27+
*/
28+
public function getBlockPrefix();
29+
2330
/**
2431
* Returns the parent type.
2532
*

0 commit comments

Comments
 (0)
0