Skip to content

docs: Port "Router" service page to 7.2#579

Open
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/docs-issue-383-router-7.2
Open

docs: Port "Router" service page to 7.2#579
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/docs-issue-383-router-7.2

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Ports the legacy Router guide into plugin_services/router.rst on the 7.2 base branch, converting the Markdown source to RST. Injects Symfony's RouterInterface and calls generate() in services, and documents the Twig path()/url() functions for templates (the legacy $view['router'] PHP-template helper no longer exists in Mautic 7). Resolves docs issue #383.

Trigger Events


Tip: Whenever you leave a comment tagged @Promptless on a Promptless PR, Promptless will remember it for future suggestions 🧠

@promptless-for-oss promptless-for-oss requested a review from a team July 10, 2026 09:49

.. vale on

Use the router to generate URLs from route names. In services, inject ``Symfony\Component\Routing\RouterInterface`` and call ``generate()``:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ported the router URL-generation examples from the legacy _plugin_services_router.md. Modernized the deprecated router service generateUrl() calls to Symfony RouterInterface::generate(), and replaced the removed $view['router'] PHP-template helper (path()/url()) with the Twig path()/url() functions used in Mautic 7.

Source: https://github.com/mautic/developer-documentation/blob/main/source/includes/_plugin_services_router.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant