8000 Changes forgotten in view refactoring in 056b6e4d · dpb587/symfony@ca60259 · GitHub
[go: up one dir, main page]

Skip to content

Commit ca60259

Browse files
rouffjfabpot
authored andcommitted
Changes forgotten in view refactoring in 056b6e4d
* Several .php template have not been renamed in .php.html
1 parent a28627d commit ca60259

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/field_group.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div>
44
<?php foreach ($field->getVisibleFields() as $child): ?>
5-
<?php echo $view['form']->render($child, array(), array(), 'FrameworkBundle:Form:field_row.php') ?>
5+
<?php echo $view['form']->render($child, array(), array(), 'FrameworkBundle:Form:field_row.php.html') ?>
66
<?php endforeach; ?>
77
</div>
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php echo str_replace('{{ widget }}',
2-
$view['form']->render($field, array(), array(), 'FrameworkBundle:Form:number_field.php'),
2+
$view['form']->render($field, array(), array(), 'FrameworkBundle:Form:number_field.php.html'),
33
$field->getPattern()
44
) ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->render($field, array(), array(), 'FrameworkBundle:Form:number_field.php') ?> %
1+
<?php echo $view['form']->render($field, array(), array(), 'FrameworkBundle:Form:number_field.php.html') ?> %

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace Symfony\Bundle\FrameworkBundle\Templating\Helper;
44

55
use Symfony\Component\Templating\Helper\Helper;
6-
use Symfony\Component\Templating\Engine;
76
use Symfony\Component\Form\FieldInterface;
87
use Symfony\Component\Form\FieldGroupInterface;
8+
use Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine;
99

1010
/*
1111
* This file is part of the Symfony framework.
@@ -28,7 +28,7 @@ class FormHelper extends Helper
2828

2929
protected $engine;
3030

31-
public function __construct(Engine $engine)
31+
public function __construct(DelegatingEngine $engine)
3232
{
3333
$this->engine = $engine;
3434
}
@@ -109,7 +109,7 @@ public function render(/*FieldInterface */$field, array $attributes = array(), a
109109
public function label(/*FieldInterface */$field, $label = false, array $parameters = array(), $template = null)
110110
{
111111
if (null === $template) {
112-
$template = 'FrameworkBundle:Form:label.php';
112+
$template = 'FrameworkBundle:Form:label.php.html';
113113
}
114114

115115
return $this->engine->render($template, array(
@@ -122,7 +122,7 @@ public function label(/*FieldInterface */$field, $label = false, array $paramete
122122
public function errors(/*FieldInterface */$field, array $parameters = array(), $template = null)
123123
{
124124
if (null === $template) {
125-
$template = 'FrameworkBundle:Form:errors.php';
125+
$template = 'FrameworkBundle:Form:errors.php.html';
126126
}
127127

128128
return $this->engine->render($template, array(
@@ -134,7 +134,7 @@ public function errors(/*FieldInterface */$field, array $parameters = array(), $
134134
public function hidden(/*FieldGroupInterface */$group, array $parameters = array(), $template = null)
135135
{
136136
if (null === $template) {
137-
$template = 'FrameworkBundle:Form:hidden.php';
137+
$template = 'FrameworkBundle:Form:hidden.php.html';
138138
}
139139

140140
return $this->engine->render($template, array(
@@ -161,15 +161,15 @@ protected function lookupTemplate(/*FieldInterface */$field)
161161

162162
$underscoredName = strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($className, '_', '.')));
163163

164-
if ($this->engine->exists($guess = 'FrameworkBundle:Form:'.$underscoredName.'.php')) {
164+
if ($this->engine->exists($guess = 'FrameworkBundle:Form:'.$underscoredName.'.php.html')) {
165165
$template = $guess;
166166
}
167167

168168
$currentFqClassName = get_parent_class($currentFqClassName);
169169
} while (null === $template && false !== $currentFqClassName);
170170

171171
if (null === $template && $field instanceof FieldGroupInterface) {
172-
$template = 'FrameworkBundle:Form:field_group.php';
172+
$template = 'FrameworkBundle:Form:field_group.php.html';
173173
}
174174

175175
self::$cache[$fqClassName] = $template;

0 commit comments

Comments
 (0)
0