Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to write a program to retrieve the view object within plugin?

Answer Posted / Km Shipra Singh

To retrieve the view object within a Zend Framework plugin, you can inject the view object into your plugin constructor. Here's an example of how you might do this:nn```phpnclass MyPlugin extends Zend_Controller_Plugin_Abstract {n protected $_view; nn public function __construct(Zend_View_Interface $view = null) {n if (null !== $view) {n $this->_view = $view;n }n }nn public function preDispatch(Zend_Controller_Request_Abstract $request) {n // Access the view object here:n $this->_view->render('your_template');n }n}n```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain filters in zend framework with examples?

225


How you can set module name, controller name, and action name in zend framework?

307


How to render zf2 view within json response?

341


How to call two different views from same action?

302