bootstrapping - Zend framework common code for all the controllers -


I have a login button in the header of the website. This header is programmed in the HTML jnd framework's ideas / layout / homefile.

I have a hidden form in this layout that starts with the jQuery thickbox inline content display integration. Reason, I just want to call an AJAX call to get a small entry form.

I am creating a form using Zend_Form and the problem is that I have to do all the controllers after checking that the user is logged in or not. I want to keep this farm generation in one place, say in bootstrap and then there is an argument in bootstrap that if the user is logged in, do not create the form.

I do not know the bootstrap is the right place to do this or should I place it in some other place.

Therefore, I should instantiate the form so that the user is available everywhere if the user is not logged in.

Create your own base controller that extends to Zend_Controller_Action, after which your controller I do not know what is "jQuery thickbox inline content display integration" away ... but you have several sections that you can run to run depending on your code requirement. Init (), pre-dispatch (), post dispatch () etc. ... Just make sure that when you expand your base controller you breathe:

parent :: init () parent :: preDispatch () Parent :: Post Dispatch () etc. ... in each section so that the base code also runs properly ...


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -