Permalink
Browse files

Changes forgotten in view refactoring in 056b6e4d

* Several .php template have not been renamed in .php.html
  • Loading branch information...
1 parent a28627d commit ca60259ed0e610fc075b2963f73eac3a8a6266cf @rouffj rouffj committed with fabpot Jan 17, 2011
@@ -2,7 +2,7 @@
<div>
<?php foreach ($field->getVisibleFields() as $child): ?>
- <?php echo $view['form']->render($child, array(), array(), 'FrameworkBundle:Form:field_row.php') ?>
+ <?php echo $view['form']->render($child, array(), array(), 'FrameworkBundle:Form:field_row.php.html') ?>
<?php endforeach; ?>
</div>
@@ -1,4 +1,4 @@
<?php echo str_replace('{{ widget }}',
- $view['form']->render($field, array(), array(), 'FrameworkBundle:Form:number_field.php'),
+ $view['form']->render($field, array(), array(), 'FrameworkBundle:Form:number_field.php.html'),
$field->getPattern()
) ?>
@@ -1 +1 @@
-<?php echo $view['form']->render($field, array(), array(), 'FrameworkBundle:Form:number_field.php') ?> %
+<?php echo $view['form']->render($field, array(), array(), 'FrameworkBundle:Form:number_field.php.html') ?> %
@@ -3,9 +3,9 @@
namespace Symfony\Bundle\FrameworkBundle\Templating\Helper;
use Symfony\Component\Templating\Helper\Helper;
-use Symfony\Component\Templating\Engine;
use Symfony\Component\Form\FieldInterface;
use Symfony\Component\Form\FieldGroupInterface;
+use Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine;
/*
* This file is part of the Symfony framework.
@@ -28,7 +28,7 @@ class FormHelper extends Helper
protected $engine;
- public function __construct(Engine $engine)
+ public function __construct(DelegatingEngine $engine)
{
$this->engine = $engine;
}
@@ -109,7 +109,7 @@ public function render(/*FieldInterface */$field, array $attributes = array(), a
public function label(/*FieldInterface */$field, $label = false, array $parameters = array(), $template = null)
{
if (null === $template) {
- $template = 'FrameworkBundle:Form:label.php';
+ $template = 'FrameworkBundle:Form:label.php.html';
}
return $this->engine->render($template, array(
@@ -122,7 +122,7 @@ public function label(/*FieldInterface */$field, $label = false, array $paramete
public function errors(/*FieldInterface */$field, array $parameters = array(), $template = null)
{
if (null === $template) {
- $template = 'FrameworkBundle:Form:errors.php';
+ $template = 'FrameworkBundle:Form:errors.php.html';
}
return $this->engine->render($template, array(
@@ -134,7 +134,7 @@ public function errors(/*FieldInterface */$field, array $parameters = array(), $
public function hidden(/*FieldGroupInterface */$group, array $parameters = array(), $template = null)
{
if (null === $template) {
- $template = 'FrameworkBundle:Form:hidden.php';
+ $template = 'FrameworkBundle:Form:hidden.php.html';
}
return $this->engine->render($template, array(
@@ -161,15 +161,15 @@ protected function lookupTemplate(/*FieldInterface */$field)
$underscoredName = strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($className, '_', '.')));
- if ($this->engine->exists($guess = 'FrameworkBundle:Form:'.$underscoredName.'.php')) {
+ if ($this->engine->exists($guess = 'FrameworkBundle:Form:'.$underscoredName.'.php.html')) {
$template = $guess;
}
$currentFqClassName = get_parent_class($currentFqClassName);
} while (null === $template && false !== $currentFqClassName);
if (null === $template && $field instanceof FieldGroupInterface) {
- $template = 'FrameworkBundle:Form:field_group.php';
+ $template = 'FrameworkBundle:Form:field_group.php.html';
}
self::$cache[$fqClassName] = $template;

0 comments on commit ca60259

Please sign in to comment.