Skip to content

Commit 3a88029

Browse files
committed
Merge branch '5.1'
* 5.1: Improve the Best Practice about forms with multiple buttons Removed the file comparing Assetic and Encore
2 parents 60c0c97 + 405e5d1 commit 3a88029

File tree

5 files changed

+6
-58
lines changed

5 files changed

+6
-58
lines changed

_build/redirection_map

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,3 +505,4 @@
505505
/components/templating https://github.com/symfony/templating
506506
/components/error_handler https://github.com/symfony/error-handler
507507
/components/class_loader https://github.com/symfony/class-loader
508+
/frontend/encore/versus-assetic /frontend

best_practices.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ to add buttons in the templates. This also improves the separation of concerns,
299299
because the button styling (CSS class and other attributes) is defined in the
300300
template instead of in a PHP class.
301301

302+
However, if you create a :doc:`form with multiple submit buttons </form/multiple_buttons>`
303+
you should define them in the controller instead of the template. Otherwise, you
304+
won't be able to check which button was clicked when handling the form in the controller.
305+
302306
Define Validation Constraints on the Underlying Object
303307
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
304308

frontend.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ Issues & Questions
8080
..................
8181

8282
* :doc:`FAQ & Common Issues </frontend/encore/faq>`
83-
* :doc:`/frontend/encore/versus-assetic`
8483

8584
Full API
8685
........

frontend/encore/versus-assetic.rst

Lines changed: 0 additions & 56 deletions
This file was deleted.

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ version
16791679
This option is used to *bust* the cache on assets by globally adding a query
16801680
parameter to all rendered asset paths (e.g. ``/images/logo.png?v2``). This
16811681
applies only to assets rendered via the Twig ``asset()`` function (or PHP
1682-
equivalent) as well as assets rendered with Assetic.
1682+
equivalent).
16831683

16841684
For example, suppose you have the following:
16851685

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy