This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Form/FormFactoryInterface.php
Bernhard Schussek a97366fbcb [Form] Split signature of FormFactory::create() into create() and createNamed()
The data can now be passed to all creation methods:

    $form = $factory->create('form', $data);

By default, a form will receive the name of its type ("form" in above example). If you wish to pass a custom name, use createNamed():

    $form = $factory->createNamed('form', 'myform', $data);
2011-04-22 10:42:21 +02:00

28 lines
812 B
PHP

<?php
/*
* This file is part of the Symfony package.
*
* (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 Symfony\Component\Form;
interface FormFactoryInterface
{
function create($type, $data = null, array $options = array());
function createNamed($type, $name, $data = null, array $options = array());
function createForProperty($class, $property, $data = null, array $options = array());
function createBuilder($type, $data = null, array $options = array());
function createNamedBuilder($type, $name, $data = null, array $options = array());
function createBuilderForProperty($class, $property, $data = null, array $options = array());
}