Skip to content

Commit

Permalink
Simplify routes config by following Symfony standards
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 authored and phansys committed Aug 9, 2020
1 parent 47d1cea commit cd4ff08
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions src/Resources/config/routing/sonata_admin.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
<?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">
<route id="sonata_admin_redirect" path="/">
<default key="_controller">Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction</default>
<route id="sonata_admin_redirect" path="/" controller="Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction">
<default key="route">sonata_admin_dashboard</default>
<default key="permanent">true</default>
</route>
<route id="sonata_admin_dashboard" path="/dashboard">
<default key="_controller">Sonata\AdminBundle\Action\DashboardAction</default>
</route>
<route id="sonata_admin_retrieve_form_element" path="/core/get-form-field-element">
<default key="_controller">sonata.admin.action.retrieve_form_field_element</default>
</route>
<route id="sonata_admin_append_form_element" path="/core/append-form-field-element">
<default key="_controller">sonata.admin.action.append_form_field_element</default>
</route>
<route id="sonata_admin_short_object_information" path="/core/get-short-object-description.{_format}">
<default key="_controller">sonata.admin.action.get_short_object_description</default>
<default key="_format">html</default>
<route id="sonata_admin_dashboard" path="/dashboard" controller="Sonata\AdminBundle\Action\DashboardAction"/>
<route id="sonata_admin_retrieve_form_element" path="/core/get-form-field-element" controller="sonata.admin.action.retrieve_form_field_element"/>
<route id="sonata_admin_append_form_element" path="/core/append-form-field-element" controller="sonata.admin.action.append_form_field_element"/>
<route id="sonata_admin_short_object_information" path="/core/get-short-object-description.{_format}" format="html" controller="sonata.admin.action.get_short_object_description">
<requirement key="_format">html|json</requirement>
</route>
<route id="sonata_admin_set_object_field_value" path="/core/set-object-field-value">
<default key="_controller">sonata.admin.action.set_object_field_value</default>
</route>
<route id="sonata_admin_search" path="/search">
<default key="_controller">Sonata\AdminBundle\Action\SearchAction</default>
</route>
<route id="sonata_admin_retrieve_autocomplete_items" path="/core/get-autocomplete-items">
<default key="_controller">sonata.admin.action.retrieve_autocomplete_items</default>
</route>
<route id="sonata_admin_set_object_field_value" path="/core/set-object-field-value" controller="sonata.admin.action.set_object_field_value"/>
<route id="sonata_admin_search" path="/search" controller="Sonata\AdminBundle\Action\SearchAction"/>
<route id="sonata_admin_retrieve_autocomplete_items" path="/core/get-autocomplete-items" controller="sonata.admin.action.retrieve_autocomplete_items"/>
</routes>

0 comments on commit cd4ff08

Please sign in to comment.