Commit 3d14ac4e authored by Fabien Potencier's avatar Fabien Potencier

merged branch igorw/symfony-bridges-docs (PR #173)

Commits
-------

394ea192 [docs] basic documentation for the SymfonyBridgesExtension

Discussion
----------

[docs] basic documentation for the SymfonyBridgesExtension

there are no extensive usage examples, but it's a start.
parents 15afe4b5 394ea192
...@@ -60,6 +60,7 @@ All of these are within the ``Silex\Extension`` namespace. ...@@ -60,6 +60,7 @@ All of these are within the ``Silex\Extension`` namespace.
* :doc:`MonologExtension <extensions/monolog>` * :doc:`MonologExtension <extensions/monolog>`
* :doc:`SessionExtension <extensions/session>` * :doc:`SessionExtension <extensions/session>`
* :doc:`SwiftmailerExtension <extensions/swiftmailer>` * :doc:`SwiftmailerExtension <extensions/swiftmailer>`
* :doc:`SymfonyBridgesExtension <extensions/symfony_bridges>`
* :doc:`TwigExtension <extensions/twig>` * :doc:`TwigExtension <extensions/twig>`
* :doc:`TranslationExtension <extensions/translation>` * :doc:`TranslationExtension <extensions/translation>`
* :doc:`UrlGeneratorExtension <extensions/url_generator>` * :doc:`UrlGeneratorExtension <extensions/url_generator>`
......
...@@ -8,6 +8,7 @@ Silex ...@@ -8,6 +8,7 @@ Silex
monolog monolog
session session
swiftmailer swiftmailer
symfony_bridges
translation translation
twig twig
url_generator url_generator
......
SymfonyBridgesExtension
=======================
The *SymfonyBridgesExtension* provides additional integration between
Symfony2 components and libraries.
Parameters
----------
* **symfony_bridges.class_path** (optional): Path to where
the Symfony2 Bridges are located.
Twig
----
When the ``SymfonyBridgesExtension`` is enabled, the ``TwigExtension`` will
provide you with the following additional capabilities:
* **UrlGeneratorExtension**: If you are using the ``UrlGeneratorExtension``,
you will get ``path`` and ``url`` helpers for Twig. You can find more
information in the
`Symfony2 Routing documentation <http://symfony.com/doc/current/book/routing.html#generating-urls-from-a-template>`_.
* **TranslationExtension**: If you are using the ``TranslationExtension``,
you will get ``trans`` and ``transchoice`` helpers for translation in
Twig templates. You can find more information in the
`Symfony2 Translation documentation <http://symfony.com/doc/current/book/translation.html#twig-templates>`_.
* **FormExtension**: If you are using the ``FormExtension``,
you will get a set of helpers for working with forms in templates.
You can find more information in the
`Symfony2 Forms reference <http://symfony.com/doc/current/reference/forms/twig_reference.html>`_.
Registering
-----------
Make sure you place a copy of the Symfony2 Bridges in
``vendor/symfony/src``. You can simply clone the whole Symfony2 into vendor::
$app->register(new Silex\Extension\SymfonyBridgesExtension(), array(
'symfony_bridges.class_path' => __DIR__.'/vendor/symfony/src',
));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment