[Form] Added getBlockPrefix() to ResolvedFormTypeInterface
This commit is contained in:
parent
ab2044f6d8
commit
7e89345a0d
@ -43,20 +43,12 @@ class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface
|
||||
$this->dataCollector = $dataCollector;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->proxiedType->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return method_exists($this->proxiedType, 'getBlockPrefix') ? $this->proxiedType->getBlockPrefix() : $this->getName();
|
||||
return $this->proxiedType->getBlockPrefix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,9 +56,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the prefix of the template block name for this type.
|
||||
*
|
||||
* @return string The prefix of the template block name
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
|
@ -20,6 +20,13 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
interface ResolvedFormTypeInterface
|
||||
{
|
||||
/**
|
||||
* Returns the prefix of the template block name for this type.
|
||||
*
|
||||
* @return string The prefix of the template block name
|
||||
*/
|
||||
public function getBlockPrefix();
|
||||
|
||||
/**
|
||||
* Returns the parent type.
|
||||
*
|
||||
|
Reference in New Issue
Block a user