Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Routing] Add small improvements #15514

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

Merged
merged 1 commit into from
Jul 15, 2021
Merged
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
10 changes: 5 additions & 5 deletions 10 routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ and in route imports. Symfony defines some special attributes with the same name
format="html">

<requirement key="_locale">en|fr</requirement>
<requirement key="_format">html|rss</requirement>
<requirement key="_format">html|xml</requirement>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the "Annotations" and "YAML" examples, the _format parameter is set to html | xml.


</route>
</routes>
Expand All @@ -972,7 +972,7 @@ and in route imports. Symfony defines some special attributes with the same name
->format('html')
->requirements([
'_locale' => 'en|fr',
'_format' => 'html|rss',
'_format' => 'html|xml',
])
;
};
Expand Down Expand Up @@ -1662,7 +1662,7 @@ multi-tenant applications) and these parameters can be validated too with
};

In the above example, the ``subdomain`` parameter defines a default value because
otherwise you need to include a domain value each time you generate a URL using
otherwise you need to include a subdomain value each time you generate a URL using
these routes.

.. tip::
Expand All @@ -1682,7 +1682,7 @@ these routes.
[],
['HTTP_HOST' => 'm.example.com']
// or get the value from some configuration parameter:
// ['HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain')]
// ['HTTP_HOST' => 'm.'.$client->getContainer()->getParameter('domain')]
);

.. _i18n-routing:
Expand Down Expand Up @@ -1813,7 +1813,7 @@ with a locale. This can be done by defining a different prefix for each locale
->prefix([
// don't prefix URLs for English, the default locale
'en' => '',
'nl' => '/nl'
'nl' => '/nl',
])
;
};
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.