diff --git a/best_practices/business-logic.rst b/best_practices/business-logic.rst index 913d7a69ab1..3f1022a10d1 100644 --- a/best_practices/business-logic.rst +++ b/best_practices/business-logic.rst @@ -193,7 +193,7 @@ The three entities defined by our sample blog application are a good example: Doctrine Mapping Information ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Doctrine Entities are plain PHP objects that you store in some "database". +Doctrine entities are plain PHP objects that you store in some "database". Doctrine only knows about your entities through the mapping metadata configured for your model classes. Doctrine supports four metadata formats: YAML, XML, PHP and annotations. diff --git a/best_practices/configuration.rst b/best_practices/configuration.rst index 7f4d99c204d..76aac62de31 100644 --- a/best_practices/configuration.rst +++ b/best_practices/configuration.rst @@ -107,9 +107,7 @@ If you've done something like this in the past, it's likely that you've in fact *never* actually needed to change that value. Creating a configuration option for a value that you are never going to configure just isn't necessary. Our recommendation is to define these values as constants in your application. -You could, for example, define a ``NUM_ITEMS`` constant in the ``Post`` entity: - -.. code-block:: php +You could, for example, define a ``NUM_ITEMS`` constant in the ``Post`` entity:: // src/AppBundle/Entity/Post.php namespace AppBundle\Entity; diff --git a/best_practices/controllers.rst b/best_practices/controllers.rst index dc21bc9f767..5c024786621 100644 --- a/best_practices/controllers.rst +++ b/best_practices/controllers.rst @@ -73,7 +73,7 @@ Template Configuration .. best-practice:: - Don't use the ``@Template()`` annotation to configure the template used by + Don't use the ``@Template`` annotation to configure the template used by the controller. The ``@Template`` annotation is useful, but also involves some magic. We @@ -148,7 +148,7 @@ For example: )); } -Normally, you'd expect a ``$id`` argument to ``showAction``. Instead, by +Normally, you'd expect a ``$id`` argument to ``showAction()``. Instead, by creating a new argument (``$post``) and type-hinting it with the ``Post`` class (which is a Doctrine entity), the ParamConverter automatically queries for an object whose ``$id`` property matches the ``{id}`` value. It will diff --git a/best_practices/creating-the-project.rst b/best_practices/creating-the-project.rst index 7e658fdae59..45dcc987220 100644 --- a/best_practices/creating-the-project.rst +++ b/best_practices/creating-the-project.rst @@ -104,7 +104,7 @@ ProductBundle, then there's no advantage to having two separate bundles. .. best-practice:: - Create only one bundle called AppBundle for your application logic + Create only one bundle called AppBundle for your application logic. Implementing a single AppBundle bundle in your projects will make your code more concise and easier to understand. Starting in Symfony 2.6, the official @@ -179,8 +179,6 @@ The changes are pretty superficial, but for now, we recommend that you use the Symfony directory structure. .. _`Composer`: https://getcomposer.org/ -.. _`Get Started`: https://getcomposer.org/doc/00-intro.md -.. _`Composer download page`: https://getcomposer.org/download/ -.. _`public checksums repository`: https://github.com/sensiolabs/checksums -.. _`these steps`: http://fabien.potencier.org/signing-project-releases.html .. _`Phar extension`: http://php.net/manual/en/intro.phar.php +.. _`public checksums repository`: https://github.com/sensiolabs/checksums +.. _`these steps`: http://fabien.potencier.org/signing-project-releases.html \ No newline at end of file diff --git a/best_practices/forms.rst b/best_practices/forms.rst index 73f2c0d775c..f51e7657284 100644 --- a/best_practices/forms.rst +++ b/best_practices/forms.rst @@ -52,7 +52,7 @@ form in its own PHP class:: Put the form type classes in the ``AppBundle\Form`` namespace, unless you use other custom form classes like data transformers. -To use the class, use ``createForm`` and pass the fully qualified class name:: +To use the class, use ``createForm()`` and pass the fully qualified class name:: // ... use AppBundle\Form\PostType; @@ -155,8 +155,8 @@ thing in one line to rendering each part of each field independently. The best way depends on how much customization you need. One of the simplest ways - which is especially useful during development - -is to render the form tags and use ``form_widget()`` to render all of the -fields: +is to render the form tags and use the ``form_widget()`` function to render +all of the fields: .. code-block:: html+twig @@ -166,7 +166,7 @@ fields: If you need more control over how your fields are rendered, then you should remove the ``form_widget(form)`` function and render your fields individually. -See the :doc:`/cookbook/form/form_customization` article for more information +See the :doc:`/cookbook/form/form_customization` cookbook article for more information on this and how you can control *how* the form renders at a global level using form theming. @@ -199,9 +199,9 @@ Handling a form submit usually follows a similar template: There are really only two notable things here. First, we recommend that you use a single action for both rendering the form and handling the form submit. -For example, you *could* have a ``newAction`` that *only* renders the form -and a ``createAction`` that *only* processes the form submit. Both those -actions will be almost identical. So it's much simpler to let ``newAction`` +For example, you *could* have a ``newAction()`` that *only* renders the form +and a ``createAction()`` that *only* processes the form submit. Both those +actions will be almost identical. So it's much simpler to let ``newAction()`` handle everything. Second, we recommend using ``$form->isSubmitted()`` in the ``if`` statement diff --git a/best_practices/i18n.rst b/best_practices/i18n.rst index 6d87c608344..cfbd5fb47e2 100644 --- a/best_practices/i18n.rst +++ b/best_practices/i18n.rst @@ -47,15 +47,15 @@ Translation Source File Location .. best-practice:: - Store the translation files in the ``app/Resources/translations/`` directory. + Store the translation files in the ``app/Resources/translations/`` + directory. Traditionally, Symfony developers have created these files in the -``Resources/translations/`` directory of each bundle. - -But since the ``app/Resources/`` directory is considered the global location -for the application's resources, storing translations in ``app/Resources/translations/`` +``Resources/translations/`` directory of each bundle. But since the +``app/Resources/`` directory is considered the global location for the +application's resources, storing translations in ``app/Resources/translations/`` centralizes them *and* gives them priority over any other translation file. -This lets you override translations defined in third-party bundles. +This let's you override translations defined in third-party bundles. Translation Keys ---------------- @@ -85,7 +85,7 @@ English in the application would be: - + title.post_list Post List diff --git a/best_practices/tests.rst b/best_practices/tests.rst index 0fc3602bf41..1f41afb9de7 100644 --- a/best_practices/tests.rst +++ b/best_practices/tests.rst @@ -26,9 +26,7 @@ functional tests, you can quickly spot any big errors before you deploy them: Define a functional test that at least checks if your application pages are successfully loading. -A functional test can be as easy as this: - -.. code-block:: php +A functional test can be as easy as this:: // src/AppBundle/Tests/ApplicationAvailabilityFunctionalTest.php namespace AppBundle\Tests; @@ -116,10 +114,10 @@ Learn More about Functional Tests Consider using the `HautelookAliceBundle`_ to generate real-looking data for your test fixtures using `Faker`_ and `Alice`_. -.. _`Faker`: https://github.com/fzaninotto/Faker -.. _`Alice`: https://github.com/nelmio/alice .. _`PhpUnit`: https://phpunit.de/ .. _`PhpSpec`: http://www.phpspec.net/ -.. _`Mink`: http://mink.behat.org .. _`smoke testing`: https://en.wikipedia.org/wiki/Smoke_testing_(software) +.. _`Mink`: http://mink.behat.org .. _`HautelookAliceBundle`: https://github.com/hautelook/AliceBundle +.. _`Faker`: https://github.com/fzaninotto/Faker +.. _`Alice`: https://github.com/nelmio/alice diff --git a/book/translation.rst b/book/translation.rst index 26e39ac2f1b..1982003bf2d 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -134,7 +134,7 @@ different formats, XLIFF being the recommended format: - + Symfony is great J'aime Symfony @@ -713,7 +713,7 @@ bundle. - + author.name.not_blank Please enter an author name. diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 714075900f6..823cd54a8ed 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -22,8 +22,8 @@ answer. Consider the real-world example where you want to provide a plugin system for your project. A plugin should be able to add methods, or do something before or after a method is executed, without interfering with other plugins. -This is not an easy problem to solve with single and multiple inheritance -(were it possible with PHP) has its own drawbacks. +This is not an easy problem to solve with single inheritance, and even if +multiple inheritance was possible with PHP, it comes with its own drawbacks. The Symfony EventDispatcher component implements the `Mediator`_ pattern in a simple and effective way to make all these things possible and to make diff --git a/components/translation/usage.rst b/components/translation/usage.rst index 7f7ba4a7546..00887e5bb12 100644 --- a/components/translation/usage.rst +++ b/components/translation/usage.rst @@ -115,11 +115,11 @@ recommended format. These files are parsed by one of the loader classes. - + Symfony is great J'aime Symfony - + symfony.great J'aime Symfony diff --git a/cookbook/bundles/extension.rst b/cookbook/bundles/extension.rst index 1cc271212e2..908a408e34f 100644 --- a/cookbook/bundles/extension.rst +++ b/cookbook/bundles/extension.rst @@ -113,6 +113,12 @@ Other available loaders are the ``YamlFileLoader``, ``PhpFileLoader`` and The ``IniFileLoader`` can only be used to load parameters and it can only load them as strings. +.. caution:: + + If you removed the default file with service definitions (i.e. + ``app/config/services.yml``), make sure to also remove it from the + ``imports`` key in ``app/config/config.yml``. + Using Configuration to Change the Services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index 0b8b8776b17..57526912886 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -328,7 +328,7 @@ The new environment is now accessible via:: aren't accessible, the front controller is usually protected from external IP addresses via the following code at the top of the controller:: - if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))) { + if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) { die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); } diff --git a/cookbook/routing/extra_information.rst b/cookbook/routing/extra_information.rst index dbbe7706c46..3032b47119d 100644 --- a/cookbook/routing/extra_information.rst +++ b/cookbook/routing/extra_information.rst @@ -4,10 +4,10 @@ How to Pass Extra Information from a Route to a Controller ========================================================== -Parameters inside the ``defaults`` collection don't necessarily have to -match a placeholder in the route ``path``. In fact, you can use the -``defaults`` array to specify extra parameters that will then be accessible as -arguments to your controller: +Parameters inside the ``defaults`` collection don't necessarily have to match +a placeholder in the route ``path``. In fact, you can use the ``defaults`` +array to specify extra parameters that will then be accessible as arguments +to your controller, and as attributes of the ``Request`` object: .. configuration-block:: @@ -52,12 +52,25 @@ arguments to your controller: return $collection; -Now, you can access this extra parameter in your controller:: +Now, you can access this extra parameter in your controller, as an argument +to the controller method:: public function indexAction($page, $title) { // ... } -As you can see, the ``$title`` variable was never defined inside the route path, -but you can still access its value from inside your controller. +Alternatively, the title could be accessed through the ``Request`` object:: + + use Symfony\Component\HttpFoundation\Request; + + public function indexAction(Request $request, $page) + { + $title = $request->attributes->get('title'); + + // ... + } + +As you can see, the ``$title`` variable was never defined inside the route +path, but you can still access its value from inside your controller, through +the method's argument, or from the ``Request`` object's ``attributes`` bag. diff --git a/cookbook/security/access_control.rst b/cookbook/security/access_control.rst index 21d0021aae0..00b73837be6 100644 --- a/cookbook/security/access_control.rst +++ b/cookbook/security/access_control.rst @@ -178,7 +178,7 @@ pattern so that it is only accessible by requests from the local server itself: # ... access_control: # - - { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, fe80::1, ::1] } + - { path: ^/internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] } - { path: ^/internal, roles: ROLE_NO_ACCESS } .. code-block:: xml @@ -195,7 +195,7 @@ pattern so that it is only accessible by requests from the local server itself: @@ -211,7 +211,7 @@ pattern so that it is only accessible by requests from the local server itself: array( 'path' => '^/internal', 'role' => 'IS_AUTHENTICATED_ANONYMOUSLY', - 'ips' => '127.0.0.1, fe80::1, ::1' + 'ips' => '127.0.0.1, ::1' ), array( 'path' => '^/internal', @@ -232,8 +232,8 @@ the external IP address ``10.0.0.1``: that does not match an existing role, it just serves as a trick to always deny access). -But if the same request comes from ``127.0.0.1``, ``::1`` (the IPv6 loopback -address) or ``fe80::1`` (the IPv6 link-local address): +But if the same request comes from ``127.0.0.1`` or ``::1`` (the IPv6 loopback +address): * Now, the first access control rule is enabled as both the ``path`` and the ``ip`` match: access is allowed as the user always has the diff --git a/cookbook/serializer.rst b/cookbook/serializer.rst index b32873b5250..9bf60060c1a 100644 --- a/cookbook/serializer.rst +++ b/cookbook/serializer.rst @@ -218,7 +218,7 @@ A service leveraging `APCu`_ (and APC for PHP < 5.5) is built-in. Going Further with the Serializer Component ------------------------------------------- -`DunglasApiBundle`_ provides an API system supporting `JSON-LD`_ and `Hydra Core Vocabulary`_ +`ApiPlatform`_ provides an API system supporting `JSON-LD`_ and `Hydra Core Vocabulary`_ hypermedia formats. It is built on top of the Symfony Framework and its Serializer component. It provides custom normalizers and a custom encoder, custom metadata and a caching system. @@ -227,6 +227,6 @@ If you want to leverage the full power of the Symfony Serializer component, take a look at how this bundle works. .. _`APCu`: https://github.com/krakjoe/apcu -.. _`DunglasApiBundle`: https://github.com/dunglas/DunglasApiBundle +.. _`ApiPlatform`: https://github.com/api-platform/core .. _`JSON-LD`: http://json-ld.org .. _`Hydra Core Vocabulary`: http://hydra-cg.com diff --git a/quick_tour/the_architecture.rst b/quick_tour/the_architecture.rst index 72e312b24c1..20e64e1301e 100644 --- a/quick_tour/the_architecture.rst +++ b/quick_tour/the_architecture.rst @@ -257,7 +257,7 @@ Understanding the Cache and Logs -------------------------------- Symfony applications can contain several configuration files defined in -several formats (YAML, XML, PHP, etc.) Instead of parsing and combining +several formats (YAML, XML, PHP, etc.). Instead of parsing and combining all those files for each request, Symfony uses its own cache system. In fact, the application configuration is only parsed for the very first request and then compiled down to plain PHP code stored in the ``app/cache/`` @@ -309,4 +309,4 @@ need to learn a lot to become a Symfony master. Ready to dig into these topics now? Look no further - go to the official :doc:`/book/index` and pick any topic you want. -.. _Composer: https://getcomposer.org +.. _`Composer`: https://getcomposer.org diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index af5edbeab18..3e6d4cd915f 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -29,13 +29,17 @@ When developing a Symfony application, your responsibility as a developer is to write the code that maps the user's *request* (e.g. ``http://localhost:8000/``) to the *resource* associated with it (the ``Homepage`` HTML page). -The code to execute is defined in **actions** and **controllers**. The mapping -between user's requests and that code is defined via the **routing** configuration. -And the contents displayed in the browser are usually rendered using **templates**. +The code to execute is defined as methods of PHP classes. The methods are +called **actions** and the classes **controllers**, but in practice most +developers use **controllers** to refer to both of them. The mapping between +user's requests and that code is defined via the **routing** configuration. +And the contents displayed in the browser are usually rendered using +**templates**. + +When you go to ``http://localhost:8000/app/example``, Symfony will execute +the controller in ``src/AppBundle/Controller/DefaultController.php`` and +render the ``app/Resources/views/default/index.html.twig`` template. -When you browsed ``http://localhost:8000/app/example`` earlier, Symfony executed -the controller defined in the ``src/AppBundle/Controller/DefaultController.php`` -file and rendered the ``app/Resources/views/default/index.html.twig`` template. In the following sections you'll learn in detail the inner workings of Symfony controllers, routes and templates. @@ -69,7 +73,7 @@ is called ``Default`` and the PHP class is called ``DefaultController``. The methods defined in a controller are called **actions**, they are usually associated with one URL of the application and their names are suffixed with ``Action``. In this example, the ``Default`` controller has only one -action called ``index`` and defined in the ``indexAction`` method. +action called ``index`` and defined in the ``indexAction()`` method. Actions are usually very short - around 10-15 lines of code - because they just call other parts of the application to get or generate the needed @@ -85,7 +89,7 @@ Routing Symfony routes each request to the action that handles it by matching the requested URL against the paths configured by the application. Open again the ``src/AppBundle/Controller/DefaultController.php`` file and take a look -at the three lines of code above the ``indexAction`` method:: +at the three lines of code above the ``indexAction()`` method:: // src/AppBundle/Controller/DefaultController.php namespace AppBundle\Controller; @@ -138,7 +142,8 @@ The only content of the ``index`` action is this PHP instruction:: The ``$this->render()`` method is a convenient shortcut to render a template. Symfony provides some useful shortcuts to any controller extending from -the ``Controller`` class. +the base Symfony :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller` +class. By default, application templates are stored in the ``app/Resources/views/`` directory. Therefore, the ``default/index.html.twig`` template corresponds @@ -194,7 +199,7 @@ environments**. What is an Environment? ~~~~~~~~~~~~~~~~~~~~~~~ -An :term:`Environment` represents a group of configurations that's used +An :term:`environment` represents a group of configurations that's used to run your application. Symfony defines two environments by default: ``dev`` (suited for when developing the application locally) and ``prod`` (optimized for when executing the application on production). @@ -235,7 +240,7 @@ In this example, the ``config_dev.yml`` configuration file imports the common with its own options. For more details on environments, see -":ref:`Environments & Front Controllers `" article. +:ref:`the "Environments" section ` of the book. Final Thoughts -------------- @@ -246,6 +251,4 @@ how Symfony makes it really easy to implement web sites better and faster. If you are eager to learn more about Symfony, dive into the next section: ":doc:`The View `". -.. _Composer: https://getcomposer.org/ -.. _executable installer: https://getcomposer.org/download -.. _Twig: http://twig.sensiolabs.org/ +.. _`Twig`: http://twig.sensiolabs.org/ diff --git a/quick_tour/the_controller.rst b/quick_tour/the_controller.rst index 07f30142699..b7dc01b672e 100644 --- a/quick_tour/the_controller.rst +++ b/quick_tour/the_controller.rst @@ -15,8 +15,9 @@ result of executing any action of any controller is the creation of a to the user. So far, all the actions shown in this tutorial used the ``$this->render()`` -shortcut to return a rendered response as result. In case you need it, you -can also create a raw ``Response`` object to return any text content:: +controller shortcut method to return a rendered template as result. In case +you need it, you can also create a raw ``Response`` object to return any +text content:: // src/AppBundle/Controller/DefaultController.php namespace AppBundle\Controller; @@ -51,7 +52,7 @@ each value. Let's create a new action with route variables to show this feature in action. Open the ``src/AppBundle/Controller/DefaultController.php`` file and add -a new method called ``helloAction`` with the following content:: +a new method called ``helloAction()`` with the following content:: // src/AppBundle/Controller/DefaultController.php namespace AppBundle\Controller; @@ -343,4 +344,4 @@ That's all there is to it and I'm not even sure you'll have spent the full 10 minutes. You were briefly introduced to bundles in the first part and all the features you've learned about so far are part of the core FrameworkBundle. But thanks to bundles, everything in Symfony can be extended or replaced. -That's the topic of the :doc:`next part of this tutorial `. +That's the topic of the :doc:`next part of this tutorial `. \ No newline at end of file diff --git a/quick_tour/the_view.rst b/quick_tour/the_view.rst index 7609730f916..e419be70ade 100644 --- a/quick_tour/the_view.rst +++ b/quick_tour/the_view.rst @@ -15,7 +15,7 @@ about this template engine. This section just gives you a quick overview of its main concepts. A Twig template is a text file that can generate any type of content (HTML, -CSS, JavaScript, XML, CSV, LaTeX, etc.) Twig elements are separated from +CSS, JavaScript, XML, CSV, LaTeX, etc.). Twig elements are separated from the rest of the template contents using any of these delimiters: ``{{ ... }}`` @@ -50,7 +50,7 @@ Below is a minimal template that illustrates a few basics, using two variables -To render a template in Symfony, use the ``render`` method from within a +To render a template in Symfony, use the ``render()`` method from within a controller. If the template needs variables to generate its contents, pass them as an array using the second optional argument:: @@ -160,7 +160,7 @@ Don't forget to check out the official `Twig documentation`_ to learn everything about filters, functions and tags. Including other Templates -~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------- The best way to share a snippet of code between several templates is to create a new template fragment that can then be included from other templates. @@ -190,7 +190,7 @@ using the ``include()`` function: {% endblock %} Embedding other Controllers -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------------------------- And what if you want to embed the result of another controller in a template? That's very useful when working with Ajax, or when the embedded template @@ -212,7 +212,6 @@ action of the ``Default`` controller (the ``AppBundle`` part will be explained later):: // src/AppBundle/Controller/DefaultController.php - class DefaultController extends Controller { public function topArticlesAction() @@ -229,31 +228,31 @@ later):: } Creating Links between Pages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +---------------------------- Creating links between pages is a must for web applications. Instead of -hardcoding URLs in templates, the ``path`` function knows how to generate -URLs based on the routing configuration. That way, all your URLs can be -easily updated by just changing the configuration: +hardcoding URLs in templates, the ``path()`` function knows how to generate +URLs based on the routing configuration. That way, all your URLs +can be easily updated by just changing the configuration: .. code-block:: html+twig Return to homepage -The ``path`` function takes the route name as the first argument and you +The ``path()`` function takes the route name as the first argument and you can optionally pass an array of route parameters as the second argument. .. tip:: - The ``url`` function is very similar to the ``path`` function, but generates + The ``url()`` function is very similar to the ``path()`` function, but generates *absolute* URLs, which is very handy when rendering emails and RSS files: ``Visit our website``. Including Assets: Images, JavaScripts and Stylesheets -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +----------------------------------------------------- What would the Internet be without images, JavaScripts and stylesheets? -Symfony provides the ``asset`` function to deal with them easily: +Symfony provides the ``asset()`` function to deal with them easily: .. code-block:: twig @@ -262,10 +261,11 @@ Symfony provides the ``asset`` function to deal with them easily: The ``asset()`` function looks for the web assets inside the ``web/`` directory. -If you store them in another directory, read :doc:`this article ` +If you store them in another directory, read +:doc:`this article ` to learn how to manage web assets. -Using the ``asset`` function, your application is more portable. The reason +Using the ``asset()`` function, your application is more portable. The reason is that you can move the application root directory anywhere under your web root directory without changing anything in your template's code. @@ -285,5 +285,5 @@ But I'm getting ahead of myself. First, you need to learn more about the controller and that's exactly the topic of the :doc:`next part of this tutorial `. Ready for another 10 minutes with Symfony? -.. _Twig: http://twig.sensiolabs.org/ -.. _Twig documentation: http://twig.sensiolabs.org/documentation +.. _`Twig`: http://twig.sensiolabs.org/ +.. _`Twig documentation`: http://twig.sensiolabs.org/documentation diff --git a/reference/forms/types/textarea.rst b/reference/forms/types/textarea.rst index 38990ae3883..f6ba20909dc 100644 --- a/reference/forms/types/textarea.rst +++ b/reference/forms/types/textarea.rst @@ -29,6 +29,12 @@ Renders a ``textarea`` HTML element. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType` | +-------------+------------------------------------------------------------------------+ +.. tip:: + + If you prefer to use an **advanced WYSIWYG editor** instead of a plain + textarea, consider using the IvoryCKEditorBundle community bundle. Read + `its documentation`_ to learn how to integrate it in your Symfony application. + Inherited Options ----------------- @@ -67,3 +73,5 @@ The default value is ``''`` (the empty string). .. include:: /reference/forms/types/options/required.rst.inc .. include:: /reference/forms/types/options/trim.rst.inc + +.. _`its documentation`: https://symfony.com/doc/current/bundles/IvoryCKEditorBundle/index.html