[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;
|
$this->dataCollector = $dataCollector;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function getName()
|
|
||||||
{
|
|
||||||
return $this->proxiedType->getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getBlockPrefix()
|
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.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return string The prefix of the template block name
|
|
||||||
*/
|
*/
|
||||||
public function getBlockPrefix()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,13 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
*/
|
*/
|
||||||
interface ResolvedFormTypeInterface
|
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.
|
* Returns the parent type.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user