diff --git a/_build/redirection_map b/_build/redirection_map index 2d3f18a6871..916bf8c154a 100644 --- a/_build/redirection_map +++ b/_build/redirection_map @@ -460,6 +460,7 @@ /testing/doctrine /testing/database /doctrine/lifecycle_callbacks /doctrine/events /doctrine/event_listeners_subscribers /doctrine/events +/doctrine/common_extensions /doctrine /best_practices/index /best_practices /best_practices/introduction /best_practices /best_practices/creating-the-project /best_practices diff --git a/doctrine.rst b/doctrine.rst index 485254f7bba..7a4558240c9 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -804,6 +804,14 @@ Database Testing Read the article about :doc:`testing code that interacts with the database `. +Doctrine Extensions (Timestampable, Translatable, etc.) +------------------------------------------------------- + +Doctrine community has created some extensions to implement common needs such as +*"set the value of the createdAt property automatically when creating an entity"*. +Read more about the `available Doctrine extensions`_ and use the +`StofDoctrineExtensionsBundle`_ to integrate them in your application. + Learn more ---------- @@ -811,7 +819,6 @@ Learn more :maxdepth: 1 doctrine/associations - doctrine/common_extensions doctrine/events doctrine/registration_form doctrine/custom_dql_functions @@ -839,3 +846,5 @@ Learn more .. _`Doctrine screencast series`: https://symfonycasts.com/screencast/symfony-doctrine .. _`API Platform`: https://api-platform.com/docs/core/validation/ .. _`PDO`: https://php.net/pdo +.. _`available Doctrine extensions`: https://github.com/Atlantic18/DoctrineExtensions +.. _`StofDoctrineExtensionsBundle`: https://github.com/antishov/StofDoctrineExtensionsBundle diff --git a/doctrine/common_extensions.rst b/doctrine/common_extensions.rst deleted file mode 100644 index c4c27461046..00000000000 --- a/doctrine/common_extensions.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. index:: - single: Doctrine; Common extensions - -How to use Doctrine Extensions: Timestampable, Sluggable, Translatable, etc. -============================================================================ - -Doctrine2 is very flexible, and the community has already created a series -of useful Doctrine extensions to help you with common entity-related tasks. - -One library in particular - the `DoctrineExtensions`_ library - provides integration -functionality for `Sluggable`_, `Translatable`_, `Timestampable`_, `Loggable`_, -`Tree`_ and `Sortable`_ behaviors. - -The usage for each of these extensions is explained in that repository. - -However, to install/activate each extension you must register and activate an -:ref:`Doctrine event Listener `. To do this, you have two options: - -#. Use the `StofDoctrineExtensionsBundle`_, which integrates the above library. - -#. Implement this services directly by following the documentation for integration - with Symfony: `Install Gedmo Doctrine2 extensions in Symfony2`_ - -.. _`DoctrineExtensions`: https://github.com/Atlantic18/DoctrineExtensions -.. _`StofDoctrineExtensionsBundle`: https://symfony.com/doc/master/bundles/StofDoctrineExtensionsBundle/index.html -.. _`Sluggable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/sluggable.md -.. _`Translatable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/translatable.md -.. _`Timestampable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/timestampable.md -.. _`Loggable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/loggable.md -.. _`Tree`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/tree.md -.. _`Sortable`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/sortable.md -.. _`Install Gedmo Doctrine2 extensions in Symfony2`: https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/symfony2.md