<?xml version="1.0" encoding="UTF-8" ?>

<routes xmlns="http://symfony.com/schema/routing"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">

{% block body %}
    <route id="{{ route_name_prefix }}" path="/">
        <default key="_controller">{{ bundle }}:{{ entity }}:index</default>
    </route>

    <route id="{{ route_name_prefix }}_show" path="/{id}/show">
        <default key="_controller">{{ bundle }}:{{ entity }}:show</default>
    </route>

{% if 'new' in actions %}
    <route id="{{ route_name_prefix }}_new" path="/new">
        <default key="_controller">{{ bundle }}:{{ entity }}:new</default>
    </route>

    <route id="{{ route_name_prefix }}_create" path="/create" methods="POST">
        <default key="_controller">{{ bundle }}:{{ entity }}:create</default>
    </route>
{% endif %}

{% if 'edit' in actions %}
    <route id="{{ route_name_prefix }}_edit" path="/{id}/edit">
        <default key="_controller">{{ bundle }}:{{ entity }}:edit</default>
    </route>

    <route id="{{ route_name_prefix }}_update" path="/{id}/update" methods="POST|PUT">
        <default key="_controller">{{ bundle }}:{{ entity }}:update</default>
    </route>
{% endif %}

{% if 'delete' in actions %}
    <route id="{{ route_name_prefix }}_delete" path="/{id}/delete" methods="POST|DELETE">
        <default key="_controller">{{ bundle }}:{{ entity }}:delete</default>
    </route>
{% endif %}
{% endblock body %}

</routes>
