[Form] Fixed signature of FormThemeInterface::render()
This commit is contained in:
parent
b21929423e
commit
67d85c6bc7
@ -48,8 +48,10 @@ class PhpEngineTheme implements FormThemeInterface
|
|||||||
$this->templateDir = $templateDir;
|
$this->templateDir = $templateDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render(array $blocks, $section, array $parameters)
|
public function render($blocks, $section, array $parameters)
|
||||||
{
|
{
|
||||||
|
$blocks = (array)$blocks;
|
||||||
|
|
||||||
foreach ($blocks as &$block) {
|
foreach ($blocks as &$block) {
|
||||||
$block = $block.'_'.$section;
|
$block = $block.'_'.$section;
|
||||||
|
|
||||||
|
@ -13,5 +13,5 @@ namespace Symfony\Component\Form\Renderer\Theme;
|
|||||||
|
|
||||||
interface FormThemeInterface
|
interface FormThemeInterface
|
||||||
{
|
{
|
||||||
function render(array $blocks, $section, array $parameters);
|
function render($blocks, $section, array $parameters);
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,10 @@ class PhpTheme implements FormThemeInterface
|
|||||||
$this->charset = $charset;
|
$this->charset = $charset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render(array $blocks, $section, array $parameters)
|
public function render($blocks, $section, array $parameters)
|
||||||
{
|
{
|
||||||
|
$blocks = (array)$blocks;
|
||||||
|
|
||||||
foreach ($blocks as $block) {
|
foreach ($blocks as $block) {
|
||||||
$method = $block.'_'.$section;
|
$method = $block.'_'.$section;
|
||||||
|
|
||||||
|
@ -73,10 +73,12 @@ class TwigTheme implements FormThemeInterface
|
|||||||
return array_unique($names);
|
return array_unique($names);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render(array $blocks, $section, array $parameters)
|
public function render($blocks, $section, array $parameters)
|
||||||
{
|
{
|
||||||
$this->initialize();
|
$this->initialize();
|
||||||
|
|
||||||
|
$blocks = (array)$blocks;
|
||||||
|
|
||||||
foreach ($blocks as $block) {
|
foreach ($blocks as $block) {
|
||||||
$blockName = $block.'__'.$section;
|
$blockName = $block.'__'.$section;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user