I tried hard but still could not get , for what purpsoe , i can use buildview and finish view in symfony2.
can someone please give me some simple example how can use it.
I am trying to learn symfony by using all its functions
You can use buildView and finishView methods in your type to pass new view vars to the form template. You can pass stuff from form options or form data class for example.
Method buildView is run before children views are built so you cannot access child views there (then you should use finishView which are run after children views are built).
bulidView example
finishView example
second buildView example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With