View/Helper/Navigation.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_View
- Subpackage
- Helper
- Version
- $Id$
\Zend_View_Helper_Navigation
- Parent(s)
- \Zend_View_Helper_Navigation_HelperAbstract < \Zend_View_Helper_HtmlElement < \Zend_View_Helper_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties

string $_defaultProxy = 'menu''menu'Details- Type
- string

bool $_injectContainer = truetrueDetails- Type
- bool
Methods

__call(string $method, array $arguments = array()) : mixedMagic overload: Proxy to other navigation helpers or the container
// 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');
| Name | Type | Description |
|---|---|---|
| $method | string | helper name or method name in container |
| $arguments | array | [optional] arguments to pass |
| Type | Description |
|---|---|
| mixed | returns what the proxied call returns |
| Exception | Description |
|---|---|
| \Zend_View_Exception | if proxying to a helper, and the helper is not an instance of the interface specified in {@link findHelper()} |
| \Zend_Navigation_Exception | if method does not exist in container |

_inject(\Zend_View_Helper_Navigation_Helper $helper) : voidInjects container, ACL, and translator to the given $helper if this helper is configured to do so
| Name | Type | Description |
|---|---|---|
| $helper | \Zend_View_Helper_Navigation_Helper | helper instance |

findHelper(string $proxy, bool $strict = true) : \Zend_View_Helper_Navigation_HelperReturns the helper matching $proxy
| Name | Type | Description |
|---|---|---|
| $proxy | string | helper name |
| $strict | bool | [optional] whether |
| Type | Description |
|---|---|
| \Zend_View_Helper_Navigation_Helper | helper instance |
| Exception | Description |
|---|---|
| \Zend_Loader_PluginLoader_Exception | if $strict is true and helper cannot be found |
| \Zend_View_Exception | if $strict is true and helper does not implement the specified interface |

getDefaultProxy() : stringReturns the default proxy to use in {@link render()}
| Type | Description |
|---|---|
| string | the default proxy to use in {@link render()} |

getInjectAcl() : boolReturns whether ACL should be injected when proxying
| Type | Description |
|---|---|
| bool | whether ACL should be injected when proxying |

getInjectContainer() : boolReturns whether container should be injected when proxying
| Type | Description |
|---|---|
| bool | whether container should be injected when proxying |

getInjectTranslator() : boolReturns whether translator should be injected when proxying
| Type | Description |
|---|---|
| bool | whether translator should be injected when proxying |

navigation(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_NavigationHelper entry point
| Name | Type | Description |
|---|---|---|
| $container | \Zend_Navigation_Container | [optional] container to |
| Type | Description |
|---|---|
| \Zend_View_Helper_Navigation | fluent interface, returns self |

render(\Zend_Navigation_Container $container = null) : stringRenders helper
| Name | Type | Description |
|---|---|---|
| $container | \Zend_Navigation_Container | [optional] container to |
| Type | Description |
|---|---|
| string | helper output |
| Exception | Description |
|---|---|
| \Zend_Loader_PluginLoader_Exception | if helper cannot be found |
| \Zend_View_Exception | if helper doesn't implement the interface specified in {@link findHelper()} |

setDefaultProxy(string $proxy) : \Zend_View_Helper_NavigationSets the default proxy to use in {@link render()}
| Name | Type | Description |
|---|---|---|
| $proxy | string | default proxy |
| Type | Description |
|---|---|
| \Zend_View_Helper_Navigation | fluent interface, returns self |

setInjectAcl(bool $injectAcl = true) : \Zend_View_Helper_NavigationSets whether ACL should be injected when proxying
| Name | Type | Description |
|---|---|---|
| $injectAcl | bool | [optional] whether ACL should be |
| Type | Description |
|---|---|
| \Zend_View_Helper_Navigation | fluent interface, returns self |

setInjectContainer(bool $injectContainer = true) : \Zend_View_Helper_NavigationSets whether container should be injected when proxying
| Name | Type | Description |
|---|---|---|
| $injectContainer | bool | [optional] whether container should |
| Type | Description |
|---|---|
| \Zend_View_Helper_Navigation | fluent interface, returns self |

setInjectTranslator(bool $injectTranslator = true) : \Zend_View_Helper_NavigationSets whether translator should be injected when proxying
| Name | Type | Description |
|---|---|---|
| $injectTranslator | bool | [optional] whether translator should |
| Type | Description |
|---|---|
| \Zend_View_Helper_Navigation | fluent interface, returns self |