Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:plugins:view_helpers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
vufind2:building_a_view_helper [2012/09/21 17:32] – demiankatz | development:plugins:view_helpers [2015/12/10 19:13] – ↷ Page moved and renamed from vufind2:building_a_view_helper to development:plugins:view_helpers demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Building a View Helper ====== | ====== Building a View Helper ====== | ||
- | View helpers are a convenient way of encapsulating logic that is useful during template rendering. | + | View helpers are a convenient way of encapsulating logic that is useful during template rendering. |
Creating a view helper is simple: | Creating a view helper is simple: | ||
* Pick a namespace for your view helpers. | * Pick a namespace for your view helpers. | ||
- | * In your chosen namespace, create a class that extends \Zend\View\Helper\AbstractHelper. | + | * In your chosen namespace, create a class that extends \Zend\View\Helper\AbstractHelper. |
* Create a [[customizing the user interface|custom theme]] if you have not done so already. | * Create a [[customizing the user interface|custom theme]] if you have not done so already. | ||
- | * Specify your helper namespace with the helper_namespace setting | + | * Configure |
- | * Specify the name of your helper by adding | + | |
---- struct data ---- | ---- struct data ---- | ||
---- | ---- | ||
development/plugins/view_helpers.txt · Last modified: 2020/03/19 21:53 by crhallberg