971. Class

971.1. Zend\View\Helper\Navigation

Proxy helper for retrieving navigational helpers and forwarding calls

971.1.1. Methods

971.1.1.1. __invoke

__invoke()

Helper entry point

Parameters:string|AbstractContainer – container to operate on
Return type:Navigation

971.1.1.2. __call

__call()

Magic overload: Proxy to other navigation helpers or the container

Examples of usage from a view script or layout: <code> // proxy to Menu helper and render container: echo $this->navigation()->menu();

// proxy to Breadcrumbs helper and set indentation: $this->navigation()->breadcrumbs()->setIndent(8);

// proxy to container and find all pages with ‘blog’ route: $blogPages = $this->navigation()->findAllByRoute(‘blog’); </code>

Parameters:
  • string – helper name or method name in container
  • array – [optional] arguments to pass
Return type:

mixed returns what the proxied call returns

Throws :

ZendViewExceptionExceptionInterface if proxying to a helper, and the helper is not an instance of the interface specified in {@link findHelper()}

Throws :

ZendNavigationExceptionExceptionInterface if method does not exist in container

971.1.1.3. setPluginManager

setPluginManager()

Set manager for retrieving navigation helpers

Parameters:NavigationPluginManager
Return type:Navigation

971.1.1.4. getPluginManager

getPluginManager()

Retrieve plugin loader for navigation helpers

Lazy-loads an instance of NavigationHelperLoader if none currently registered.

Return type:NavigationPluginManager

971.1.1.5. findHelper

findHelper()

Returns the helper matching $proxy

The helper must implement the interface {@link ZendViewHelperNavigationHelper}.

Parameters:
  • string – helper name
  • bool – [optional] whether exceptions should be thrown if something goes wrong. Default is true.
Return type:

ZendViewHelperNavigationHelperInterface helper instance

Throws :

ExceptionRuntimeException if $strict is true and helper cannot be found

971.1.1.6. inject

inject()

Injects container, ACL, and translator to the given $helper if this helper is configured to do so

Parameters:NavigationHelper – helper instance
Return type:void

971.1.1.7. setDefaultProxy

setDefaultProxy()

Sets the default proxy to use in {@link render()}

Parameters:string – default proxy
Return type:ZendViewHelperNavigation fluent interface, returns self

971.1.1.8. getDefaultProxy

getDefaultProxy()

Returns the default proxy to use in {@link render()}

Return type:string the default proxy to use in {@link render()}

971.1.1.9. setInjectContainer

setInjectContainer()

Sets whether container should be injected when proxying

Parameters:bool – [optional] whether container should be injected when proxying. Default is true.
Return type:ZendViewHelperNavigation fluent interface, returns self

971.1.1.10. getInjectContainer

getInjectContainer()

Returns whether container should be injected when proxying

Return type:bool whether container should be injected when proxying

971.1.1.11. setInjectAcl

setInjectAcl()

Sets whether ACL should be injected when proxying

Parameters:bool – [optional] whether ACL should be injected when proxying. Default is true.
Return type:ZendViewHelperNavigation fluent interface, returns self

971.1.1.12. getInjectAcl

getInjectAcl()

Returns whether ACL should be injected when proxying

Return type:bool whether ACL should be injected when proxying

971.1.1.13. setInjectTranslator

setInjectTranslator()

Sets whether translator should be injected when proxying

Parameters:bool – [optional] whether translator should be injected when proxying. Default is true.
Return type:Navigation fluent interface, returns self

971.1.1.14. getInjectTranslator

getInjectTranslator()

Returns whether translator should be injected when proxying

Return type:bool whether translator should be injected when proxying

971.1.1.15. render

render()

Renders helper

Parameters:ZendNavigationAbstractContainer – [optional] container to render. Default is to render the container registered in the helper.
Return type:string helper output
Throws :ExceptionRuntimeException if helper cannot be found

971.1.2. Constants

971.1.2.1. NS

View helper namespace