瀏覽代碼

[FrameworkBundle] added the possibility to change the template for row()

Fabien Potencier 14 年之前
父節點
當前提交
85f888715c
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php

+ 4 - 2
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php

@@ -112,9 +112,11 @@ class FormHelper extends Helper
      * @param  FieldInterface $field
      * @return string
      */
-    public function row(/*FieldInterface*/ $field)
+    public function row(/*FieldInterface*/ $field, $template = null)
     {
-        $template = 'FrameworkBundle:Form:field_row.php.html';
+        if (null === $template) {
+            $template = 'FrameworkBundle:Form:field_row.php.html';
+        }
 
         return $this->engine->render($template, array(
             'field' => $field,