Commit 3ffe0c72 authored by Alexander Lokhman's avatar Alexander Lokhman Committed by Fabien Potencier

Add form type support in FormTrait for flexibility

parent 136153aa
......@@ -25,11 +25,12 @@ trait FormTrait
*
* @param mixed $data The initial data for the form
* @param array $options Options for the form
* @param string|FormTypeInterface $type Type of the form
*
* @return FormBuilder
*/
public function form($data = null, array $options = array())
public function form($data = null, array $options = array(), $type = 'form')
{
return $this['form.factory']->createBuilder('form', $data, $options);
return $this['form.factory']->createBuilder($type, $data, $options);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment