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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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