Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage my own Translation entity extending Model\Translation #28

Open
pom-user opened this issue Jul 9, 2015 · 8 comments
Open

Manage my own Translation entity extending Model\Translation #28

pom-user opened this issue Jul 9, 2015 · 8 comments

Comments

@pom-user
Copy link

pom-user commented Jul 9, 2015

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
Copy link
Collaborator

xabbuh commented Jul 10, 2015

@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
Copy link
Owner

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

@victor-paumier
Copy link

@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
Copy link
Collaborator

xabbuh commented Jul 21, 2015

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

@victor-paumier
Copy link

@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
Copy link
Contributor

qbarbosa commented Apr 1, 2016

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

@xabbuh
Copy link
Collaborator

xabbuh commented Apr 1, 2016

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

@qbarbosa
Copy link
Contributor

qbarbosa commented Apr 1, 2016

@xabbuh I did it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants