From 9b195f9ff46b5f4ee4654ba3d8d2a97ec51e335e Mon Sep 17 00:00:00 2001 From: David Maicher Date: Fri, 9 Sep 2016 18:39:12 +0200 Subject: [PATCH 1/2] [FrameworkBundle] add support for prioritizing form type extension tags Doc PR for https://github.com/symfony/symfony/pull/19790 --- form/create_form_type_extension.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/form/create_form_type_extension.rst b/form/create_form_type_extension.rst index e0bcb69a7fd..28d6322de26 100644 --- a/form/create_form_type_extension.rst +++ b/form/create_form_type_extension.rst @@ -128,6 +128,14 @@ The ``extended_type`` key of the tag is the type of field that this extension sh be applied to. In your case, as you want to extend the ``Symfony\Component\Form\Extension\Core\Type\FileType`` field type, you will use that as the ``extended_type``. +.. tip:: + + There is an optional tag attribute called ``priority``, which + defaults to ``0`` and it controls the order in which the form + type extensions are loaded (the higher the priority, the earlier + an extension is loaded). This is useful when you need to guarantee + that one extensions is loaded before or after another extension. + Adding the extension Business Logic ----------------------------------- From d4154afc430061251766a6de95a1e0b4996cbc8e Mon Sep 17 00:00:00 2001 From: David Maicher Date: Sat, 10 Sep 2016 17:45:04 +0200 Subject: [PATCH 2/2] Review changes --- form/create_form_type_extension.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/form/create_form_type_extension.rst b/form/create_form_type_extension.rst index 28d6322de26..7e06b0ad10b 100644 --- a/form/create_form_type_extension.rst +++ b/form/create_form_type_extension.rst @@ -131,10 +131,10 @@ field type, you will use that as the ``extended_type``. .. tip:: There is an optional tag attribute called ``priority``, which - defaults to ``0`` and it controls the order in which the form + defaults to ``0`` and controls the order in which the form type extensions are loaded (the higher the priority, the earlier an extension is loaded). This is useful when you need to guarantee - that one extensions is loaded before or after another extension. + that one extension is loaded before or after another extension. Adding the extension Business Logic -----------------------------------