Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit dde2c9d

Browse files
committed
Added documentation for Sonata FrontendLinkExtension
Fixes #609
1 parent a77877c commit dde2c9d

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

bundles/routing/dynamic.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,53 @@ configuration in the ``sonata_admin`` section of your project configuration:
614614
615615
See the `Sonata Admin extension documentation`_ for more information.
616616

617+
FrontendLink Sonata Admin Extension
618+
----------------------------------------------
619+
620+
This bundle provides an extension to show a button in Sonata Admin, which links on the actual
621+
frontend representation of a document. Documents which implement the ``RouteReferrersReadInterface``
622+
and Routes itself (``Symfony\Component\Routing\Route``) are supported.
623+
624+
To enable the extension in your admin classes, simply define the extension
625+
configuration in the ``sonata_admin`` section of your project configuration:
626+
627+
.. configuration-block::
628+
629+
.. code-block:: yaml
630+
631+
# app/config/config.yml
632+
sonata_admin:
633+
# ...
634+
extensions:
635+
cmf_routing.admin_extension.frontend_link:
636+
implements:
637+
- Symfony\Cmf\Component\Routing\RouteReferrersReadInterface
638+
639+
.. code-block:: xml
640+
641+
<!-- app/config/config.xml -->
642+
<config xmlns="http://sonata-project.org/schema/dic/admin">
643+
<!-- ... -->
644+
<extension id="cmf_routing.admin_extension.frontend_link">
645+
<implement>Symfony\Cmf\Component\Routing\RouteReferrersReadInterface</implement>
646+
</extension>
647+
</config>
648+
649+
.. code-block:: php
650+
651+
// app/config/config.php
652+
$container->loadFromExtension('sonata_admin', array(
653+
'extensions' => array(
654+
'cmf_routing.admin_extension.frontend_link' => array(
655+
'implements' => array(
656+
'Symfony\Cmf\Component\Routing\RouteReferrersReadInterface',
657+
),
658+
),
659+
),
660+
));
661+
662+
See the `Sonata Admin extension documentation`_ for more information.
663+
617664
Customize the DynamicRouter
618665
---------------------------
619666

0 commit comments

Comments
 (0)