Le 26/05/2011 18:12, Oleg Stepura a écrit :
My solution for this was the only one possible. But I think it's a bit
ugly.
As discussed here:
http://groups.google.com/group/symfony-devs/browse_thread/thread/5f23cfdb002092e8/10db85f7ab5dd842?lnk=gst&q=bubbling#10db85f7ab5dd842
I've added
/**
* {@inheritdoc}
*/
public function getParent()
{
return 'FrameworkBundle';
}
to the bundle declaration.
Then I placed the form_widget.html.php and filed_label.html.php to
Bundle\Resources\views\Form\ to customize domain.
This solution is bad simply because of the thing that it would work
for all forms in that bundle. You still cannot customize each form
translation domain. And since Startime in one form can mean one thing
(the time when News will become active 4 example) in other form it
could mean another thing (the time when the auction will start) so
translation domain should differ.
So I'm also still looking for a better solution. The current approach
is good for visual formatting widget overriding in a Bundle but not
for translation domain overriding for a form.
Your approch is not good as it is unusable as soon as you have 2 bundles
(a bundle can only have one child bundle). The good solution to
overwrite the displaying easily would be to implement form theming in
PHP templates too but this is not as easy as for Twig due to the way the
PHP TemplatingEngine works.
--
Christophe | Stof
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en