diff --git a/components/config/definition.rst b/components/config/definition.rst index e9d6aa6d2d6..657e70f262c 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -106,6 +106,25 @@ node definition. Node type are available for: and are created with ``node($name, $type)`` or their associated shortcut ``xxxxNode($name)`` method. +Enum nodes +~~~~~~~~~~ + +.. versionadded:: 2.1 + The enum node is new in 2.1 + +Enum nodes provide a constraint to match the given input against a set of +values:: + + $rootNode + ->children() + ->enumNode('gender') + ->values(array('male', 'female')) + ->end() + ->end() + ; + +This will restrict the ``gender`` option to be either ``male`` or ``female``. + Array nodes ~~~~~~~~~~~
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: