Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 110 lines (101 sloc) 4.244 kb
f690ac8 @webmozart [Form] Refactored contents of FormFactory into individual FieldConfig cl...
webmozart authored
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
bc7ab4d @fabpot replaced symfony-project.org by symfony.com
fabpot authored
6 * (c) Fabien Potencier <fabien@symfony.com>
f690ac8 @webmozart [Form] Refactored contents of FormFactory into individual FieldConfig cl...
webmozart authored
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Form;
13
130ec50 @webmozart [Form] Fixed API docs and usage of FormBuilderInterface instead of FormB...
webmozart authored
14 /**
15 * @author Bernhard Schussek <bschussek@gmail.com>
16 */
f690ac8 @webmozart [Form] Refactored contents of FormFactory into individual FieldConfig cl...
webmozart authored
17 interface FormFactoryInterface
18 {
35d9e23 @vicb [Form] phpDoc
vicb authored
19 /**
20 * Returns a form.
21 *
22 * @see createBuilder()
23 *
e5dde8c @fabpot fixed phpdoc @param alignment
fabpot authored
24 * @param string|FormTypeInterface $type The type of the form
25 * @param mixed $data The initial data
26 * @param array $options The options
35d9e23 @vicb [Form] phpDoc
vicb authored
27 *
fae4396 @Tobion [Form] fix PhpDoc
Tobion authored
28 * @return FormInterface The form named after the type
35d9e23 @vicb [Form] phpDoc
vicb authored
29 *
d448780 @Olden [Form] Make exception handling consistent with other components
Olden authored
30 * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the given type
35d9e23 @vicb [Form] phpDoc
vicb authored
31 */
54d2d72 @webmozart [Form] Removed deprecated code scheduled for removal in 2.3
webmozart authored
32 public function create($type = 'form', $data = null, array $options = array());
e87b7c1 @webmozart [Form] Introduced FieldBuilder for field/form creation and made Field/Fo...
webmozart authored
33
35d9e23 @vicb [Form] phpDoc
vicb authored
34 /**
35 * Returns a form.
36 *
fae4396 @Tobion [Form] fix PhpDoc
Tobion authored
37 * @see createNamedBuilder()
38 *
cf2f027 @fabpot fixed types in phpdocs
fabpot authored
39 * @param string|int $name The name of the form
6d2fc5b @webmozart [Form] Reversed the order of $type and $name in FormFactory::createNamed...
webmozart authored
40 * @param string|FormTypeInterface $type The type of the form
e5dde8c @fabpot fixed phpdoc @param alignment
fabpot authored
41 * @param mixed $data The initial data
42 * @param array $options The options
35d9e23 @vicb [Form] phpDoc
vicb authored
43 *
fae4396 @Tobion [Form] fix PhpDoc
Tobion authored
44 * @return FormInterface The form
35d9e23 @vicb [Form] phpDoc
vicb authored
45 *
d448780 @Olden [Form] Make exception handling consistent with other components
Olden authored
46 * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the given type
35d9e23 @vicb [Form] phpDoc
vicb authored
47 */
54d2d72 @webmozart [Form] Removed deprecated code scheduled for removal in 2.3
webmozart authored
48 public function createNamed($name, $type = 'form', $data = null, array $options = array());
e87b7c1 @webmozart [Form] Introduced FieldBuilder for field/form creation and made Field/Fo...
webmozart authored
49
35d9e23 @vicb [Form] phpDoc
vicb authored
50 /**
51 * Returns a form for a property of a class.
52 *
fae4396 @Tobion [Form] fix PhpDoc
Tobion authored
53 * @see createBuilderForProperty()
54 *
54d2d72 @webmozart [Form] Removed deprecated code scheduled for removal in 2.3
webmozart authored
55 * @param string $class The fully qualified class name
56 * @param string $property The name of the property to guess for
57 * @param mixed $data The initial data
58 * @param array $options The options for the builder
35d9e23 @vicb [Form] phpDoc
vicb authored
59 *
fae4396 @Tobion [Form] fix PhpDoc
Tobion authored
60 * @return FormInterface The form named after the property
35d9e23 @vicb [Form] phpDoc
vicb authored
61 *
d448780 @Olden [Form] Make exception handling consistent with other components
Olden authored
62 * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the form type
35d9e23 @vicb [Form] phpDoc
vicb authored
63 */
54d2d72 @webmozart [Form] Removed deprecated code scheduled for removal in 2.3
webmozart authored
64 public function createForProperty($class, $property, $data = null, array $options = array());
86829c2 @webmozart [Form] Refactored FieldFactory and moved new implementation into the DIC...
webmozart authored
65
35d9e23 @vicb [Form] phpDoc
vicb authored
66 /**
fae4396 @Tobion [Form] fix PhpDoc
Tobion authored
67 * Returns a form builder.
35d9e23 @vicb [Form] phpDoc
vicb authored
68 *
e5dde8c @fabpot fixed phpdoc @param alignment
fabpot authored
69 * @param string|FormTypeInterface $type The type of the form
70 * @param mixed $data The initial data
71 * @param array $options The options
35d9e23 @vicb [Form] phpDoc
vicb authored
72 *
130ec50 @webmozart [Form] Fixed API docs and usage of FormBuilderInterface instead of FormB...
webmozart authored
73 * @return FormBuilderInterface The form builder
35d9e23 @vicb [Form] phpDoc
vicb authored
74 *
d448780 @Olden [Form] Make exception handling consistent with other components
Olden authored
75 * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the given type
35d9e23 @vicb [Form] phpDoc
vicb authored
76 */
54d2d72 @webmozart [Form] Removed deprecated code scheduled for removal in 2.3
webmozart authored
77 public function createBuilder($type = 'form', $data = null, array $options = array());
3e321fa @webmozart [Form] Split signature of FormFactory::create() into create() and create...
webmozart authored
78
35d9e23 @vicb [Form] phpDoc
vicb authored
79 /**
80 * Returns a form builder.
81 *
cf2f027 @fabpot fixed types in phpdocs
fabpot authored
82 * @param string|int $name The name of the form
6d2fc5b @webmozart [Form] Reversed the order of $type and $name in FormFactory::createNamed...
webmozart authored
83 * @param string|FormTypeInterface $type The type of the form
e5dde8c @fabpot fixed phpdoc @param alignment
fabpot authored
84 * @param mixed $data The initial data
85 * @param array $options The options
35d9e23 @vicb [Form] phpDoc
vicb authored
86 *
130ec50 @webmozart [Form] Fixed API docs and usage of FormBuilderInterface instead of FormB...
webmozart authored
87 * @return FormBuilderInterface The form builder
35d9e23 @vicb [Form] phpDoc
vicb authored
88 *
d448780 @Olden [Form] Make exception handling consistent with other components
Olden authored
89 * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the given type
35d9e23 @vicb [Form] phpDoc
vicb authored
90 */
54d2d72 @webmozart [Form] Removed deprecated code scheduled for removal in 2.3
webmozart authored
91 public function createNamedBuilder($name, $type = 'form', $data = null, array $options = array());
3e321fa @webmozart [Form] Split signature of FormFactory::create() into create() and create...
webmozart authored
92
35d9e23 @vicb [Form] phpDoc
vicb authored
93 /**
94 * Returns a form builder for a property of a class.
95 *
96 * If any of the 'max_length', 'required' and type options can be guessed,
97 * and are not provided in the options argument, the guessed value is used.
98 *
54d2d72 @webmozart [Form] Removed deprecated code scheduled for removal in 2.3
webmozart authored
99 * @param string $class The fully qualified class name
100 * @param string $property The name of the property to guess for
101 * @param mixed $data The initial data
102 * @param array $options The options for the builder
35d9e23 @vicb [Form] phpDoc
vicb authored
103 *
130ec50 @webmozart [Form] Fixed API docs and usage of FormBuilderInterface instead of FormB...
webmozart authored
104 * @return FormBuilderInterface The form builder named after the property
35d9e23 @vicb [Form] phpDoc
vicb authored
105 *
d448780 @Olden [Form] Make exception handling consistent with other components
Olden authored
106 * @throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException if any given option is not applicable to the form type
35d9e23 @vicb [Form] phpDoc
vicb authored
107 */
54d2d72 @webmozart [Form] Removed deprecated code scheduled for removal in 2.3
webmozart authored
108 public function createBuilderForProperty($class, $property, $data = null, array $options = array());
5c2f73e @fabpot [Form] reverted the templating part to be similar to what we have today
fabpot authored
109 }
Something went wrong with that request. Please try again.