maschmann / TranslationLoaderBundle

Symfony2 bundle with database translation loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Manage my own Translation entity extending Model\Translation

pom-user opened this issue · comments

Is it possible to manage my own Translation entity instead of using the bundle's one? In a lot of case it would be really better for me to have the possibility to link other entities with this one.
Or is there some technicals reasons which force use to do it like that?

Thx

@pom-user Technically, it should not make any difference if you used another entity class than the one provided by the bundle. I guess the only thing is to make sure that your class implements the TranslationInterface. Then you will probably only need to change the asm_translation_loader.model.translation.class parameter.

@xabbuh Should be move the class parameter as a default into the Bundle config?
Might be easier to extend, then.

@xabbuh Finally found the time to try and it works perfectly, thank you.
@maschmann If you improved the bundle on this way, could you also add the possibility to disabled automatic creation of the default entity please?!

@victor-paumier You're welcome. What do you actually mean with automatic creation of the default entity?

@xabbuh I deleted the old translation table in my DB but if I execute doctrine:schema:update --force, the table is automatically re-created even if I use my own entity.

@maschmann I implemented this modification so the bundle is now easier to extend.
You can found it here: f09d128
Merge it if you want !

@quentinsikana Would you like to create a pull request? :)

@xabbuh I did it! :)