Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AdminListBundle] Deprecated twig function my_router_params() #697

Merged
merged 1 commit into from
Sep 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% form_theme form 'KunstmaanAdminBundle:Form:fields.html.twig' %}

{% block header %}
<form action="{{ path(app.request.attributes.get('_route'), my_router_params()) }}" method="post" {{ form_enctype(form) }} novalidate="novalidate">
<form action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post" {{ form_enctype(form) }} novalidate="novalidate">
{{ parent() }}
{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/Kunstmaan/AdminListBundle/Twig/AdminListTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public function renderWidget(AdminList $view, $basepath, array $urlparams = arra
* Emulating the symfony 2.1.x $request->attributes->get('_route_params') feature.
* Code based on PagerfantaBundle's twig extension.
*
* @deprecated: you should use _route_params from the request attributes param bag now
*
* @return array
*/
public function routerParams()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block content %}
{% form_theme form 'KunstmaanAdminBundle:Form:fields.html.twig' %}
<form action="{{ path(app.request.attributes.get('_route'), my_router_params()) }}" method="post" {{ form_enctype(form) }} novalidate>
<form action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post" {{ form_enctype(form) }} novalidate>
<fieldset class="form__fieldset--padded">
{{ form_rest(form) }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block content %}
{% form_theme form 'KunstmaanAdminBundle:Form:fields.html.twig' %}
<form action="{{ path(app.request.attributes.get('_route'), my_router_params()) }}" method="post" {{ form_enctype(form) }} novalidate >
<form action="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}" method="post" {{ form_enctype(form) }} novalidate >
<fieldset class="form__fieldset--padded">
{{ form_rest(form) }}

Expand Down