<commit_before>Routing
=======

The default routes used in the CRUD controller are accessible through the
``Admin`` class.

The ``Admin`` class contains two routing method:

* ``getUrls()``: Returns the available routes;
* ``generateUrl($name, $options)``: Generates the related routes.

Routing Definition
------------------

You can set a ``baseRouteName`` property inside your ``Admin`` class, which
represents the each route prefix.

.. code-block:: php

    class PostAdmin extends Admin
    {

        protected $class = 'Application\Sonata\NewsBundle\Entity\Post';

        protected $baseRoute = 'news_post_admin';
    }


If no ``baseRouteName`` is defined then the Admin will pick on for you built on
following format : 'admin_vendor_bundlename_entityname_action'. If the Admin
fails to find the best baseRouteName then the an ``RuntimeException`` will
be throw.

The same goes for the ``baseRoutePattern``.

Routing usage
-------------
<commit_msg>fix some typos<commit_after>Routing
=======

The default routes used in the CRUD controller are accessible through the
``Admin`` class.

The ``Admin`` class contains two routing method:

* ``getUrls()``: Returns the available routes;
* ``generateUrl($name, $options)``: Generates the related routes.

Routing Definition
------------------

You can set a ``baseRouteName`` property inside your ``Admin`` class, which
represents the route prefix.

.. code-block:: php

    class PostAdmin extends Admin
    {

        protected $class = 'Application\Sonata\NewsBundle\Entity\Post';

        protected $baseRoute = 'news_post_admin';
    }


If no ``baseRouteName`` is defined then the Admin will pick on for you, built on
following format : 'admin_vendor_bundlename_entityname_action'. If the Admin
fails to find the best baseRouteName then a ``RuntimeException`` will
be throw.

The same goes for the ``baseRoutePattern``.

Routing usage
-------------

{'fraction_non_alphanumeric': 0.12722513089005236, 'fraction_numerical': 0.0, 'mean_word_length': 3.7419354838709675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4535293', 'n_tokens_mistral': 521, 'n_tokens_neox': 508, 'n_words': 210}