O'Reilly logo

Extending Symfony2 Web Application Framework by Sébastien Armand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

This chapter covered a great deal of what you could want to do in using and extending Doctrine. Combining events and filters, you can create very solid extensions. Do you want to create a new CMS where articles can only be seen after they are "published"? Events and filters will come along nicely to provide a publishable behavior to your entities. Do you need to keep versions of all changes and know who made what change and when? Here again, the events will allow you to have this taken care of on all entities without worrying about manually doing it.

As an exercise, you can try to implement a soft delete behavior. Soft delete indicates that whenever an entity is about to be deleted, you instead update a deleted field to true, or to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required