diff --git a/.gitignore b/.gitignore index b0b2aafe151..805ea28a8f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,2 @@ /_build -/bundles/DoctrineFixturesBundle -/bundles/DoctrineMigrationsBundle -/bundles/DoctrineMongoDBBundle -/bundles/SensioFrameworkExtraBundle -/bundles/SensioGeneratorBundle -/cmf /_exts diff --git a/book/controller.rst b/book/controller.rst index a351e3947d8..6294cef08ba 100644 --- a/book/controller.rst +++ b/book/controller.rst @@ -552,9 +552,7 @@ The Symfony templating engine is explained in great detail in the .. tip:: You can even avoid calling the ``render`` method by using the ``@Template`` - annotation. See the - :doc:`FrameworkExtraBundle documentation ` - more details. + annotation. See the `FrameworkExtraBundle documentation`_ more details. .. tip:: @@ -826,3 +824,5 @@ Learn more from the Cookbook * :doc:`/cookbook/controller/error_pages` * :doc:`/cookbook/controller/service` + +.. _`FrameworkExtraBundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/view.html diff --git a/book/doctrine.rst b/book/doctrine.rst index 84a54b49017..1431712bb3b 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -20,7 +20,7 @@ be. easy, and explained in the ":doc:`/cookbook/doctrine/dbal`" cookbook entry. You can also persist data to `MongoDB`_ using Doctrine ODM library. For - more information, read the ":doc:`/bundles/DoctrineMongoDBBundle/index`" + more information, read the "`DoctrineMongoDBBundle`_" documentation. A Simple Example: A Product @@ -473,10 +473,10 @@ in your application. To do this, run: new column to the existing ``product`` table. An even better way to take advantage of this functionality is via - :doc:`migrations `, which allow you to - generate these SQL statements and store them in migration classes that - can be run systematically on your production server in order to track - and migrate your database schema safely and reliably. + `migrations`_, which allow you to generate these SQL statements and store + them in migration classes that can be run systematically on your production + server in order to track and migrate your database schema safely and + reliably. Your database now has a fully-functional ``product`` table with columns that match the metadata you've specified. @@ -562,7 +562,7 @@ an ``UPDATE`` query if the record already exists in the database. Doctrine provides a library that allows you to programmatically load testing data into your project (i.e. "fixture data"). For information, see - :doc:`/bundles/DoctrineFixturesBundle/index`. + the "`DoctrineFixturesBundle`_" documentation. Fetching Objects from the Database ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -589,8 +589,7 @@ on its ``id`` value:: .. tip:: You can achieve the equivalent of this without writing any code by using - the ``@ParamConverter`` shortcut. See the - :doc:`FrameworkExtraBundle documentation ` + the ``@ParamConverter`` shortcut. See the `FrameworkExtraBundle documentation`_ for more details. When you query for a particular type of object, you always use what's known @@ -1084,7 +1083,7 @@ table, and ``product.category_id`` column, and new foreign key: This task should only be really used during development. For a more robust method of systematically updating your production database, read about - :doc:`Doctrine migrations `. + `migrations`_. Saving Related Entities ~~~~~~~~~~~~~~~~~~~~~~~ @@ -1400,8 +1399,8 @@ For more information about Doctrine, see the *Doctrine* section of the * :doc:`/cookbook/doctrine/common_extensions` * :doc:`/cookbook/doctrine/console` -* :doc:`/bundles/DoctrineFixturesBundle/index` -* :doc:`/bundles/DoctrineMongoDBBundle/index` +* :doc:`DoctrineFixturesBundle` +* :doc:`DoctrineMongoDBBundle` .. _`Doctrine`: http://www.doctrine-project.org/ .. _`MongoDB`: http://www.mongodb.org/ @@ -1414,3 +1413,7 @@ For more information about Doctrine, see the *Doctrine* section of the .. _`Lifecycle Events documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#lifecycle-events .. _`Reserved SQL keywords documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#quoting-reserved-words .. _`Persistent classes`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#persistent-classes +.. _`DoctrineMongoDBBundle`: http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html +.. _`migrations`: http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html +.. _`DoctrineFixturesBundle`: http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html +.. _`FrameworkExtraBundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html diff --git a/book/routing.rst b/book/routing.rst index 3d05d462d6a..b326f805330 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -1070,8 +1070,7 @@ from the new routing resource. .. tip:: You can also define routes using annotations. See the - :doc:`FrameworkExtraBundle documentation ` - to see how. + `FrameworkExtraBundle documentation`_ to see how. Adding a Host Requirement to Imported Routes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1298,3 +1297,4 @@ Learn more from the Cookbook * :doc:`/cookbook/routing/scheme` .. _`FOSJsRoutingBundle`: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle +.. _`FrameworkExtraBundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html diff --git a/components/http_kernel/introduction.rst b/components/http_kernel/introduction.rst index bcae5dada81..a2e062d1aa6 100644 --- a/components/http_kernel/introduction.rst +++ b/components/http_kernel/introduction.rst @@ -288,16 +288,15 @@ on the event object that's passed to listeners on this event. the Symfony Framework, and many deal with collecting profiler data when the profiler is enabled. - One interesting listener comes from the :doc:`SensioFrameworkExtraBundle `, + One interesting listener comes from the `SensioFrameworkExtraBundle`_, which is packaged with the Symfony Standard Edition. This listener's - :doc:`@ParamConverter ` - functionality allows you to pass a full object (e.g. a ``Post`` object) - to your controller instead of a scalar value (e.g. an ``id`` parameter - that was on your route). The listener - ``ParamConverterListener`` - uses - reflection to look at each of the arguments of the controller and tries - to use different methods to convert those to objects, which are then - stored in the ``attributes`` property of the ``Request`` object. Read the - next section to see why this is important. + `@ParamConverter`_ functionality allows you to pass a full object (e.g. a + ``Post`` object) to your controller instead of a scalar value (e.g. an + ``id`` parameter that was on your route). The listener - + ``ParamConverterListener`` - uses reflection to look at each of the + arguments of the controller and tries to use different methods to convert + those to objects, which are then stored in the ``attributes`` property of + the ``Request`` object. Read the next section to see why this is important. 4) Getting the Controller Arguments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -395,14 +394,12 @@ return a ``Response``. .. sidebar:: ``kernel.view`` in the Symfony Framework There is no default listener inside the Symfony Framework for the ``kernel.view`` - event. However, one core bundle - - :doc:`SensioFrameworkExtraBundle ` - - *does* add a listener to this event. If your controller returns an array, - and you place the :doc:`@Template ` - annotation above the controller, then this listener renders a template, - passes the array you returned from your controller to that template, - and creates a ``Response`` containing the returned content from that - template. + event. However, one core bundle - `SensioFrameworkExtraBundle`_ - *does* + add a listener to this event. If your controller returns an array, + and you place the `@Template`_ annotation above the controller, then this + listener renders a template, passes the array you returned from your + controller to that template, and creates a ``Response`` containing the + returned content from that template. Additionally, a popular community bundle `FOSRestBundle`_ implements a listener on this event which aims to give you a robust view layer @@ -689,3 +686,6 @@ look like this:: .. _reflection: http://php.net/manual/en/book.reflection.php .. _FOSRestBundle: https://github.com/friendsofsymfony/FOSRestBundle .. _`Create your own framework... on top of the Symfony2 Components`: http://fabien.potencier.org/article/50/create-your-own-framework-on-top-of-the-symfony2-components-part-1 +.. _`SensioFrameworkExtraBundle`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html +.. _`@ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html +.. _`@Template`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/view.html diff --git a/cookbook/controller/service.rst b/cookbook/controller/service.rst index 602b14aead3..f5efc204392 100644 --- a/cookbook/controller/service.rst +++ b/cookbook/controller/service.rst @@ -132,9 +132,8 @@ the route ``_controller`` value: .. tip:: You can also use annotations to configure routing using a controller - defined as a service. See the - :doc:`FrameworkExtraBundle documentation ` - for details. + defined as a service. See the `FrameworkExtraBundle documentation`_ for + details. Alternatives to base Controller Methods --------------------------------------- @@ -267,3 +266,4 @@ inject *only* the exact service(s) that you need directly into the controller. .. _`Controller class source code`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php .. _`base Controller class`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +.. _`FrameworkExtraBundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html diff --git a/cookbook/templating/PHP.rst b/cookbook/templating/PHP.rst index a07b489fdfc..0d9ed54644a 100644 --- a/cookbook/templating/PHP.rst +++ b/cookbook/templating/PHP.rst @@ -60,11 +60,10 @@ below renders the ``index.html.php`` template:: ); } -You can also use the :doc:`/bundles/SensioFrameworkExtraBundle/annotations/view` -shortcut to render the default ``AcmeHelloBundle:Hello:index.html.php`` template:: +You can also use the `@Template`_ shortcut to render the default +``AcmeHelloBundle:Hello:index.html.php`` template:: // src/Acme/HelloBundle/Controller/HelloController.php - use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; // ... @@ -326,3 +325,5 @@ within an HTML context. The second argument lets you change the context. For instance, to output something in a JavaScript script, use the ``js`` context:: escape($var, 'js') ?> + +.. _`@Template`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/view`