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?



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

Answer / 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

More Zend Interview Questions

What are the advantages of zend framework 3? Explain

1 Answers  


How to include js from controller and view in zend framework?

1 Answers  


How to call two different views from same action?

0 Answers  


What is the difference between zend_auth and zend_acl?

1 Answers  


How to check post method in zend framework?

1 Answers  


What is routing in zend in zend framework?

1 Answers  


How to disable layout from controller in zend framework?

1 Answers  


Explain form element decorators in zend framework2?

1 Answers  


Can we move the index.php file outside the public folder?

1 Answers  


What is the difference between zend framework and laravel?

1 Answers  


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

1 Answers  


Which version of php does zend framework require?

1 Answers  


Categories