sonata-project/SonataAdminBundle — pull request #2404 by caponica (2014-09-11 15:43:45+00:00)
Title: Allow child templates to customise form action URL

Use Twig default function to allow child templates to change the logic used in calculating the form URL.

A child template can now look like this and gain a customised form url without having to repeat the whole template (resulting code is more DRY):

{# Acme\CustomBundle\Resources\views\CRUD\foo_bar.html.twig #}
{% extends 'SonataAdminBundle:CRUD:base_edit.html.twig' %}

{% block form %}
{% set url = 'foobar' %}
{{ parent() }}
{% endblock %}