TranslationLoaderBundle icon indicating copy to clipboard operation
TranslationLoaderBundle copied to clipboard

Manage my own Translation entity extending Model\Translation

Open pom-user opened this issue 10 years ago • 8 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 avatar Jul 09 '15 21:07 pom-user

@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 avatar Jul 10 '15 07:07 xabbuh

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

maschmann avatar Jul 10 '15 11:07 maschmann

@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 avatar Jul 21 '15 04:07 victor-paumier

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

xabbuh avatar Jul 21 '15 06:07 xabbuh

@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.

victor-paumier avatar Jul 21 '15 17:07 victor-paumier

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

qbarbosa avatar Apr 01 '16 13:04 qbarbosa

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

xabbuh avatar Apr 01 '16 13:04 xabbuh

@xabbuh I did it! :)

qbarbosa avatar Apr 01 '16 13:04 qbarbosa