damien-carcel / khatovar-web

Repository for the web site of the french association “La compagnie franche du Khatovar”

Home Page:www.compagniefranchedukhatovar.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove doctrine entity file listener

damien-carcel opened this issue · comments

There is:

  • FileListener,
  • DoctrineEntityListenerPass
  • EntityListenerResolver

All these classes just to inject the upload_dir parameter into the entity.

This should be done by an independent Subscriber, that listen on a Save event. This way, all upload logic should be put outside the File and Folder entities.

The listener could also be used for the Photo entity of the KhatovarWebBundle, and allow to remove the use of __DIR__.