English spoken conference

Symfony 5: The Fast Track

A new book to learn about developing modern Symfony 5 applications.

Support this project

WARNING: You are browsing the documentation for Symfony 2.4 which is not maintained anymore. Consider upgrading your projects to Symfony 4.3.

How to use Doctrine Extensions: Timestampable, Sluggable, Translatable, etc.

2.4 version

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 Event Listener. To do this, you have two options:

  1. Use the StofDoctrineExtensionsBundle, which integrates the above library.
  2. Implement this services directly by following the documentation for integration with Symfony: Install Gedmo Doctrine2 extensions in Symfony2

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.