From 23dd6385fbdd643656f96ea37ca3b16d21706a48 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Tue, 30 Jul 2013 16:20:17 +0200 Subject: [PATCH] fixed XML examples --- book/controller.rst | 28 +++- book/doctrine.rst | 67 +++++--- book/forms.rst | 64 +++++--- book/http_cache.rst | 31 +++- book/http_fundamentals.rst | 13 +- book/internals.rst | 50 +++--- book/page_creation.rst | 67 ++++---- book/propel.rst | 3 +- book/routing.rst | 29 ++-- book/security.rst | 18 +-- book/service_container.rst | 219 +++++++++++++++++---------- book/templating.rst | 72 +++++++-- book/testing.rst | 8 +- book/translation.rst | 45 ++++-- book/validation.rst | 200 ++++++++++++++---------- reference/configuration/doctrine.rst | 1 + 16 files changed, 594 insertions(+), 321 deletions(-) diff --git a/book/controller.rst b/book/controller.rst index 921c1d905a4..f545868bb99 100644 --- a/book/controller.rst +++ b/book/controller.rst @@ -156,9 +156,16 @@ to the controller: .. code-block:: xml - - AcmeHelloBundle:Hello:index - + + + + + AcmeHelloBundle:Hello:index + + .. code-block:: php @@ -235,10 +242,17 @@ example: .. code-block:: xml - - AcmeHelloBundle:Hello:index - green - + + + + + AcmeHelloBundle:Hello:index + green + + .. code-block:: php diff --git a/book/doctrine.rst b/book/doctrine.rst index a91c3368f7c..1b96994dff9 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -80,15 +80,24 @@ information. By convention, this information is usually configured in an .. code-block:: xml - - - + + + + + + + + .. code-block:: php @@ -161,13 +170,22 @@ for you: .. code-block:: xml - - - + + + + + + + + .. code-block:: php @@ -299,6 +317,7 @@ in a number of different formats including YAML, XML or directly inside the .. code-block:: xml + + @@ -1332,9 +1353,11 @@ the current date, only when the entity is first persisted (i.e. inserted): .. code-block:: xml - - - + + diff --git a/book/forms.rst b/book/forms.rst index 5a71b220b37..08885c0996b 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -319,7 +319,11 @@ object. - + + @@ -912,10 +916,16 @@ easy to use in your application. .. code-block:: xml - - - + + + + + .. code-block:: php @@ -1375,12 +1385,20 @@ file: .. code-block:: xml - - - AcmeTaskBundle:Form:fields.html.twig - - - + + + + + + AcmeTaskBundle:Form:fields.html.twig + + + + .. code-block:: php @@ -1453,14 +1471,22 @@ file: .. code-block:: xml - - - - AcmeTaskBundle:Form - - - - + + + + + + + AcmeTaskBundle:Form + + + + + .. code-block:: php diff --git a/book/http_cache.rst b/book/http_cache.rst index 1856ee5ce80..356fb03da02 100644 --- a/book/http_cache.rst +++ b/book/http_cache.rst @@ -845,10 +845,19 @@ First, to use ESI, be sure to enable it in your application configuration: .. code-block:: xml - - - - + + + + + + + + + .. code-block:: php @@ -957,9 +966,17 @@ listener that must be enabled in your configuration: .. code-block:: xml - - - + + + + + + + .. code-block:: php diff --git a/book/http_fundamentals.rst b/book/http_fundamentals.rst index 8ead7a1299b..1654678bffc 100644 --- a/book/http_fundamentals.rst +++ b/book/http_fundamentals.rst @@ -429,9 +429,16 @@ by adding an entry for ``/contact`` to your routing configuration file: .. code-block:: xml - - AcmeDemoBundle:Main:contact - + + + + + AcmeDemoBundle:Main:contact + + .. code-block:: php diff --git a/book/internals.rst b/book/internals.rst index 17200f86db4..769dc75fedc 100644 --- a/book/internals.rst +++ b/book/internals.rst @@ -566,20 +566,27 @@ the configuration for the development environment: .. code-block:: xml - - - - - - - - - - + + + + + + + + + + + .. code-block:: php @@ -614,10 +621,17 @@ If you enable the web profiler, you also need to mount the profiler routes: .. code-block:: xml - + + + + + .. code-block:: php diff --git a/book/page_creation.rst b/book/page_creation.rst index b037cfd5224..dc100a0c5e4 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -147,7 +147,6 @@ an entry when you generated the ``AcmeHelloBundle``: - - - - + + + + + + + + + + + + + + + - - - - - - - - + .. code-block:: php @@ -976,18 +984,25 @@ the configuration file for the ``dev`` environment. .. code-block:: xml - - - - - - - - - - + + + + + + + + + + + + + .. code-block:: php diff --git a/book/propel.rst b/book/propel.rst index 900d0d81847..4c6443f9a01 100644 --- a/book/propel.rst +++ b/book/propel.rst @@ -90,7 +90,7 @@ of your ``AcmeStoreBundle``: .. code-block:: xml - + diff --git a/book/routing.rst b/book/routing.rst index eb7b64fd1b8..edeb3f35826 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -166,10 +166,18 @@ file: .. code-block:: xml - - - - + + + + + + + + .. code-block:: php @@ -207,7 +215,6 @@ A basic route consists of just two parts: the ``path`` to match and a .. code-block:: xml - - - - - - - - - - - - - - - - + xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> @@ -311,16 +308,14 @@ First, enable form login under your firewall: .. code-block:: xml + - - - @@ -387,7 +382,6 @@ submission (i.e. ``/login_check``): - AcmeSecurityBundle:Security:login - + .. code-block:: php @@ -650,7 +644,7 @@ see :doc:`/cookbook/security/form_login`. - + .. code-block:: php @@ -1784,14 +1778,12 @@ a route so that you can use it to generate the URL: - - .. code-block:: php diff --git a/book/service_container.rst b/book/service_container.rst index 29375a6f352..21a83d89379 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -116,11 +116,17 @@ be specified in YAML, XML or PHP: .. code-block:: xml - - - sendmail - - + + + + + + sendmail + + + .. code-block:: php @@ -206,16 +212,22 @@ straightforward. Parameters make defining services more organized and flexible: .. code-block:: xml - - Acme\HelloBundle\Mailer - sendmail - - - - - %my_mailer.transport% - - + + + + + Acme\HelloBundle\Mailer + sendmail + + + + + %my_mailer.transport% + + + .. code-block:: php @@ -349,16 +361,22 @@ directories don't exist, create them. .. code-block:: xml - - Acme\HelloBundle\Mailer - sendmail - - - - - %my_mailer.transport% - - + + + + + Acme\HelloBundle\Mailer + sendmail + + + + + %my_mailer.transport% + + + .. code-block:: php @@ -389,9 +407,15 @@ configuration. .. code-block:: xml - - - + + + + + + + .. code-block:: php @@ -459,12 +483,20 @@ invokes the service container extension inside the ``FrameworkBundle``: .. code-block:: xml - - - - - - + + + + + + + + + + .. code-block:: php @@ -590,19 +622,25 @@ the service container gives you a much more appealing option: .. code-block:: xml - - - Acme\HelloBundle\Newsletter\NewsletterManager - - - - - - - - - - + + + + + + Acme\HelloBundle\Newsletter\NewsletterManager + + + + + + + + + + + .. code-block:: php @@ -681,21 +719,27 @@ Injecting the dependency by the setter method just needs a change of syntax: .. code-block:: xml - - - Acme\HelloBundle\Newsletter\NewsletterManager - - - - - - - - - - - - + + + + + + Acme\HelloBundle\Newsletter\NewsletterManager + + + + + + + + + + + + + .. code-block:: php @@ -748,15 +792,20 @@ it exists and do nothing if it doesn't: .. code-block:: xml - - - - - - - - - + + + + + + + + + + + + .. code-block:: php @@ -854,10 +903,16 @@ Configuring the service container is easy: .. code-block:: xml - - - - + + + + + + + + .. code-block:: php @@ -903,10 +958,16 @@ to be used for a specific purpose. Take the following example: .. code-block:: xml - - - + + + + + + + .. code-block:: php diff --git a/book/templating.rst b/book/templating.rst index adad3623859..83023853559 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -722,9 +722,17 @@ tags: .. code-block:: xml - - - + + + + + + + .. code-block:: php @@ -750,10 +758,18 @@ in your application configuration: .. code-block:: xml - - - + + + + + + + .. code-block:: php @@ -837,9 +853,16 @@ configuration: .. code-block:: xml - - AcmeDemoBundle:Welcome:index - + + + + + AcmeDemoBundle:Welcome:index + + .. code-block:: php @@ -875,9 +898,16 @@ route: .. code-block:: xml - - AcmeArticleBundle:Article:show - + + + + + AcmeArticleBundle:Article:show + + .. code-block:: php @@ -1134,9 +1164,19 @@ configuration file: .. code-block:: xml - - - + + + + + + + + + .. code-block:: php diff --git a/book/testing.rst b/book/testing.rst index 05037850bcd..e015e83228f 100644 --- a/book/testing.rst +++ b/book/testing.rst @@ -694,7 +694,13 @@ configuration option: .. code-block:: xml - + + + diff --git a/book/translation.rst b/book/translation.rst index 58add6ec2c8..7abf5c56dda 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -61,9 +61,17 @@ enable the ``Translator`` in your configuration: .. code-block:: xml - - - + + + + + + + .. code-block:: php @@ -546,9 +554,17 @@ by defining a ``default_locale`` for the framework: .. code-block:: xml - - en - + + + + + en + + .. code-block:: php @@ -590,11 +606,18 @@ by the routing system using the special ``_locale`` parameter: .. code-block:: xml - - AcmeDemoBundle:Contact:index - en - en|fr|de - + + + + + AcmeDemoBundle:Contact:index + en + en|fr|de + + .. code-block:: php diff --git a/book/validation.rst b/book/validation.rst index 99a3d7691a1..e33e9b55812 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -263,9 +263,17 @@ annotations if you're using the annotation method to specify your constraints: .. code-block:: xml - - - + + + + + + + .. code-block:: php @@ -526,14 +534,20 @@ class to have at least 3 characters. .. code-block:: xml - - - - - - - - + + + + + + + + + + + + .. code-block:: php @@ -605,13 +619,19 @@ this method must return ``true``: .. code-block:: xml - - - - - - - + + + + + + + + + + + .. code-block:: php @@ -717,33 +737,39 @@ user registers and when a user updates his/her contact information later: .. code-block:: xml - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + .. code-block:: php @@ -874,26 +900,32 @@ username and the password are different only if all other validation passes .. code-block:: xml - - - - - - - - - - - - - - - User - Strict - - + + + + + + + + + + + + + + + + + + User + Strict + + + .. code-block:: php @@ -983,22 +1015,28 @@ entity and a new constraint group called ``Premium``: .. code-block:: xml - - - - - - - - - - - - + + + + + + + + + + + + + + + + .. code-block:: php diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index c2115238e27..2ed564e6200 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -170,6 +170,7 @@ Doctrine Configuration Reference .. code-block:: xml +