maschmann / TranslationLoaderBundle

Symfony2 bundle with database translation loader
23 stars 9 forks source link

Manage my own Translation entity extending Model\Translation #28

Open pom-user opened 9 years ago

pom-user commented 9 years ago

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

xabbuh commented 9 years ago

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

maschmann commented 9 years ago

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

victor-paumier commented 9 years ago

@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?!

xabbuh commented 9 years ago

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

victor-paumier commented 9 years ago

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

qbarbosa commented 8 years ago

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

xabbuh commented 8 years ago

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

qbarbosa commented 8 years ago

@xabbuh I did it! :)