Explorar o código

[Form] Fix the fluid interface of FormBuilder

Victor Berchet %!s(int64=14) %!d(string=hai) anos
pai
achega
eca6453558
Modificáronse 1 ficheiros con 11 adicións e 0 borrados
  1. 11 0
      src/Symfony/Component/Form/FormBuilder.php

+ 11 - 0
src/Symfony/Component/Form/FormBuilder.php

@@ -217,9 +217,16 @@ class FormBuilder
         return $this;
     }
 
+    /**
+     * Clears the client transformers.
+     *
+     * @return FormBuilder The current builder
+     */
     public function resetClientTransformers()
     {
         $this->clientTransformers = array();
+
+        return $this;
     }
 
     public function getClientTransformers()
@@ -390,12 +397,16 @@ class FormBuilder
      * Removes the field with the given name.
      *
      * @param string $name
+     *
+     * @return FormBuilder The current builder
      */
     public function remove($name)
     {
         if (isset($this->children[$name])) {
             unset($this->children[$name]);
         }
+
+        return $this;
     }
 
     /**