View/Helper/Navigation.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- 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
Package: Zend_View\HelperProxy helper for retrieving navigational helpers and forwarding calls
- 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'
Default proxy to use in {@link render()}
Default value'menu'
Details- Type
- string



array $_helpers = array()
Contains references to proxied helpers
Default valuearray()
Details- Type
- array



bool $_injectAcl = true
Whether ACL should be injected when proxying
Default valuetrue
Details- Type
- bool



bool $_injectContainer = true
Whether container should be injected when proxying
Default valuetrue
Details- Type
- bool



bool $_injectTranslator = true
Whether translator should be injected when proxying
Default valuetrue
Details- Type
- bool
Methods



__call(string $method, array $arguments = array()) : mixed
Magic overload: Proxy to other navigation helpers or the container
Examples of usage from a view script or layout:
// 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');
ParametersName | Type | Description |
---|
$method | string | helper name or method name in
container |
---|
$arguments | array | [optional] arguments to pass |
---|
ReturnsType | Description |
---|
mixed | returns what the proxied call returns |
Throws


findHelper(string $proxy, bool $strict = true) : \Zend_View_Helper_Navigation_Helper
Returns the helper matching $proxy
The helper must implement the interface
{@link Zend_View_Helper_Navigation_Helper}.
ParametersName | Type | Description |
---|
$proxy | string | helper name |
---|
$strict | bool | [optional] whether
exceptions should be
thrown if something goes
wrong. Default is true.
|
---|
ReturnsThrows


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



getInjectAcl() : bool
Returns whether ACL should be injected when proxying
ReturnsType | Description |
---|
bool | whether ACL should be injected when proxying |



getInjectContainer() : bool
Returns whether container should be injected when proxying
ReturnsType | Description |
---|
bool | whether container should be injected when proxying |



getInjectTranslator() : bool
Returns whether translator should be injected when proxying
ReturnsType | Description |
---|
bool | whether translator should be injected when proxying |



render(\Zend_Navigation_Container $container = null) : string
ParametersName | Type | Description |
---|
$container | \Zend_Navigation_Container | [optional] container to
render. Default is to
render the container
registered in the helper.
|
---|
ReturnsType | Description |
---|
string | helper output |
Throws 


setDefaultProxy(string $proxy) : \Zend_View_Helper_Navigation
Sets the default proxy to use in {@link render()}
ParametersName | Type | Description |
---|
$proxy | string | default proxy |
---|
Returns 


setInjectAcl(bool $injectAcl = true) : \Zend_View_Helper_Navigation
Sets whether ACL should be injected when proxying
ParametersName | Type | Description |
---|
$injectAcl | bool | [optional] whether ACL should be
injected when proxying. Default is
true.
|
---|
Returns 


setInjectContainer(bool $injectContainer = true) : \Zend_View_Helper_Navigation
Sets whether container should be injected when proxying
ParametersName | Type | Description |
---|
$injectContainer | bool | [optional] whether container should
be injected when proxying. Default
is true.
|
---|
Returns 


setInjectTranslator(bool $injectTranslator = true) : \Zend_View_Helper_Navigation
Sets whether translator should be injected when proxying
ParametersName | Type | Description |
---|
$injectTranslator | bool | [optional] whether translator should
be injected when proxying. Default
is true.
|
---|
Returns