소스 검색

[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,