View/Helper/Navigation.php

Show: PublicProtectedPrivateinherited
Table of Contents
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\Helper
Proxy 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

>VConstantstring  NS = 'Zend_View_Helper_Navigation'
View helper namespace
NS
string

Properties

>VPropertyprotectedstring $_defaultProxy = 'menu'
Default proxy to use in {@link render()}
Default value'menu'Details
Type
string
>VPropertyprotectedarray $_helpers = array()
Contains references to proxied helpers
Default valuearray()Details
Type
array
>VPropertyprotectedbool $_injectAcl = true
Whether ACL should be injected when proxying
Default valuetrueDetails
Type
bool
>VPropertyprotectedbool $_injectContainer = true
Whether container should be injected when proxying
Default valuetrueDetails
Type
bool
>VPropertyprotectedbool $_injectTranslator = true
Whether translator should be injected when proxying
Default valuetrueDetails
Type
bool

Methods

methodpublic__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');
Parameters
NameTypeDescription
$methodstring

helper name or method name in container

$argumentsarray

[optional] arguments to pass

Returns
TypeDescription
mixedreturns what the proxied call returns
Throws
ExceptionDescription
\Zend_View_Exceptionif proxying to a helper, and the helper is not an instance of the interface specified in {@link findHelper()}
\Zend_Navigation_Exceptionif method does not exist in container
methodprotected_inject(\Zend_View_Helper_Navigation_Helper $helper) : void

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

Parameters
NameTypeDescription
$helper\Zend_View_Helper_Navigation_Helper

helper instance

methodpublicfindHelper(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}.
Parameters
NameTypeDescription
$proxystring

helper name

$strictbool

[optional] whether

                                        exceptions should be
                                        thrown if something goes
                                        wrong. Default is true.
Returns
TypeDescription
\Zend_View_Helper_Navigation_Helperhelper instance
Throws
ExceptionDescription
\Zend_Loader_PluginLoader_Exceptionif $strict is true and helper cannot be found
\Zend_View_Exceptionif $strict is true and helper does not implement the specified interface
methodpublicgetDefaultProxy() : string

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

Returns
TypeDescription
stringthe default proxy to use in {@link render()}
methodpublicgetInjectAcl() : bool

Returns whether ACL should be injected when proxying

Returns
TypeDescription
boolwhether ACL should be injected when proxying
methodpublicgetInjectContainer() : bool

Returns whether container should be injected when proxying

Returns
TypeDescription
boolwhether container should be injected when proxying
methodpublicgetInjectTranslator() : bool

Returns whether translator should be injected when proxying

Returns
TypeDescription
boolwhether translator should be injected when proxying
methodpublicnavigation(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_Navigation

Helper entry point

Parameters
NameTypeDescription
$container\Zend_Navigation_Container

[optional] container to

                                          operate on
Returns
TypeDescription
\Zend_View_Helper_Navigationfluent interface, returns self
methodpublicrender(\Zend_Navigation_Container $container = null) : string

Renders helper

Parameters
NameTypeDescription
$container\Zend_Navigation_Container

[optional] container to

                                          render. Default is to
                                          render the container
                                          registered in the helper.
Returns
TypeDescription
stringhelper output
Throws
ExceptionDescription
\Zend_Loader_PluginLoader_Exceptionif helper cannot be found
\Zend_View_Exceptionif helper doesn't implement the interface specified in {@link findHelper()}
methodpublicsetDefaultProxy(string $proxy) : \Zend_View_Helper_Navigation

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

Parameters
NameTypeDescription
$proxystring

default proxy

Returns
TypeDescription
\Zend_View_Helper_Navigationfluent interface, returns self
methodpublicsetInjectAcl(bool $injectAcl = true) : \Zend_View_Helper_Navigation

Sets whether ACL should be injected when proxying

Parameters
NameTypeDescription
$injectAclbool

[optional] whether ACL should be

                                 injected when proxying. Default is
                                 true.
Returns
TypeDescription
\Zend_View_Helper_Navigationfluent interface, returns self
methodpublicsetInjectContainer(bool $injectContainer = true) : \Zend_View_Helper_Navigation

Sets whether container should be injected when proxying

Parameters
NameTypeDescription
$injectContainerbool

[optional] whether container should

                                 be injected when proxying. Default
                                 is true.
Returns
TypeDescription
\Zend_View_Helper_Navigationfluent interface, returns self
methodpublicsetInjectTranslator(bool $injectTranslator = true) : \Zend_View_Helper_Navigation

Sets whether translator should be injected when proxying

Parameters
NameTypeDescription
$injectTranslatorbool

[optional] whether translator should

                                 be injected when proxying. Default
                                 is true.
Returns
TypeDescription
\Zend_View_Helper_Navigationfluent interface, returns self
Documentation was generated by phpDocumentor 2.2.0 .