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 we can add custom view helpers to zend framework 2?



How we can add custom view helpers to zend framework 2?..

Answer / Bhavana Singh Chauhan

To add a custom view helper in Zend Framework 2, you need to:
1. Define the helper class that extends ZendViewHelperAbstractHelper and implements ZendServiceManagerServiceLocatorAwareInterface.
2. Register the helper in the Module's getServiceConfig() method by adding an entry for the helper in the factories array.
3. Ensure that the necessary dependencies (e.g., View) are injected into your custom view helper using Dependency Injection.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Zend Interview Questions

How we can do multiple column ordering in zend framework?

1 Answers  


What is the function lucene?

1 Answers  


Explain authorization and authentication in zend framework?

1 Answers  


Do you know what is the use of zend framework?

1 Answers  


Where we set configuration in zend framework?

1 Answers  


How can you get a module name in bootstrap file.

1 Answers  


What are the default methods provided by decorators?

1 Answers  


Explain what are the default methods provided by decorators?

1 Answers  


What is routing and how it's work?

1 Answers  


How to use a sql function or perform calculations in a statement generating with zend_db_select?

1 Answers  


What new in zend framework 2.0?

1 Answers  


What are the advantages of zend framework?

1 Answers  


Categories