Файл: onlinepoisk.wm-scripts.ru/vendor/silex/silex/silex/src/Silex/Application/FormTrait.php
Строк: 32
<?php
/*
* This file is part of the Silex framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SilexApplication;
use SymfonyComponentFormFormBuilder;
/**
* Form trait.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
trait FormTrait
{
/**
* Creates and returns a form builder instance
*
* @param mixed $data The initial data for the form
* @param array $options Options for the form
*
* @return FormBuilder
*/
public function form($data = null, array $options = array())
{
return $this['form.factory']->createBuilder('form', $data, $options);
}
}