8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aabebd4 + 48c0c87 commit 34fac25Copy full SHA for 34fac25
components/config/definition.rst
@@ -106,6 +106,25 @@ node definition. Node type are available for:
106
and are created with ``node($name, $type)`` or their associated shortcut
107
``xxxxNode($name)`` method.
108
109
+Enum nodes
110
+~~~~~~~~~~
111
+
112
+.. versionadded:: 2.1
113
+ The enum node is new in 2.1
114
115
+Enum nodes provide a constraint to match the given input against a set of
116
+values::
117
118
+ $rootNode
119
+ ->children()
120
+ ->enumNode('gender')
121
+ ->values(array('male', 'female'))
122
+ ->end()
123
124
+ ;
125
126
+This will restrict the ``gender`` option to be either ``male`` or ``female``.
127
128
Array nodes
129
~~~~~~~~~~~
130
0 commit comments