Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes

Zend_View_Helper_Navigation Class Reference

Inheritance diagram for Zend_View_Helper_Navigation:
Zend_View_Helper_Navigation_HelperAbstract Zend_View_Helper_HtmlElement Zend_View_Helper_Navigation_Helper Zend_View_Helper_Abstract Zend_View_Helper_Interface

Public Member Functions

 navigation (Zend_Navigation_Container $container=null)
 __call ($method, array $arguments=array())
 findHelper ($proxy, $strict=true)
 setDefaultProxy ($proxy)
 getDefaultProxy ()
 setInjectContainer ($injectContainer=true)
 getInjectContainer ()
 setInjectAcl ($injectAcl=true)
 getInjectAcl ()
 setInjectTranslator ($injectTranslator=true)
 getInjectTranslator ()
 render (Zend_Navigation_Container $container=null)

Data Fields

const NS = 'Zend_View_Helper_Navigation'

Protected Member Functions

 _inject (Zend_View_Helper_Navigation_Helper $helper)

Protected Attributes

 $_defaultProxy = 'menu'
 $_helpers = array()
 $_injectContainer = true
 $_injectAcl = true
 $_injectTranslator = true

Detailed Description

Definition at line 37 of file Navigation.php.


Member Function Documentation

__call ( method,
array $  arguments = array() 
)

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:
string$methodhelper name or method name in container
array$arguments[optional] arguments to pass
Returns:
mixed returns what the proxied call returns
Exceptions:
Zend_View_Exceptionif proxying to a helper, and the helper is not an instance of the interface specified in findHelper()
Zend_Navigation_Exceptionif method does not exist in container

Reimplemented from Zend_View_Helper_Navigation_HelperAbstract.

Definition at line 124 of file Navigation.php.

_inject ( Zend_View_Helper_Navigation_Helper helper ) [protected]

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

Parameters:
Zend_View_Helper_Navigation_Helper$helperhelper instance
Returns:
void

Definition at line 200 of file Navigation.php.

findHelper ( proxy,
strict = true 
)

Returns the helper matching $proxy

The helper must implement the interface Zend_View_Helper_Navigation_Helper.

Parameters:
string$proxyhelper name
bool$strict[optional] whether exceptions should be thrown if something goes wrong. Default is true.
Returns:
Zend_View_Helper_Navigation_Helper helper instance
Exceptions:
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

Definition at line 153 of file Navigation.php.

getDefaultProxy (  )

Returns the default proxy to use in render()

Returns:
string the default proxy to use in render()

Definition at line 239 of file Navigation.php.

getInjectAcl (  )

Returns whether ACL should be injected when proxying

Returns:
bool whether ACL should be injected when proxying

Definition at line 287 of file Navigation.php.

getInjectContainer (  )

Returns whether container should be injected when proxying

Returns:
bool whether container should be injected when proxying

Definition at line 263 of file Navigation.php.

getInjectTranslator (  )

Returns whether translator should be injected when proxying

Returns:
bool whether translator should be injected when proxying

Definition at line 311 of file Navigation.php.

navigation ( Zend_Navigation_Container $  container = null )

Helper entry point

Parameters:
Zend_Navigation_Container$container[optional] container to operate on
Returns:
Zend_View_Helper_Navigation fluent interface, returns self

Definition at line 90 of file Navigation.php.

render ( Zend_Navigation_Container $  container = null )

Renders helper

Parameters:
Zend_Navigation_Container$container[optional] container to render. Default is to render the container registered in the helper.
Returns:
string helper output
Exceptions:
Zend_Loader_PluginLoader_Exceptionif helper cannot be found
Zend_View_Exceptionif helper doesn't implement the interface specified in findHelper()

Implements Zend_View_Helper_Navigation_Helper.

Definition at line 331 of file Navigation.php.

setDefaultProxy ( proxy )

Sets the default proxy to use in render()

Parameters:
string$proxydefault proxy
Returns:
Zend_View_Helper_Navigation fluent interface, returns self

Definition at line 228 of file Navigation.php.

setInjectAcl ( injectAcl = true )

Sets whether ACL should be injected when proxying

Parameters:
bool$injectAcl[optional] whether ACL should be injected when proxying. Default is true.
Returns:
Zend_View_Helper_Navigation fluent interface, returns self

Definition at line 276 of file Navigation.php.

setInjectContainer ( injectContainer = true )

Sets whether container should be injected when proxying

Parameters:
bool$injectContainer[optional] whether container should be injected when proxying. Default is true.
Returns:
Zend_View_Helper_Navigation fluent interface, returns self

Definition at line 252 of file Navigation.php.

setInjectTranslator ( injectTranslator = true )

Sets whether translator should be injected when proxying

Parameters:
bool$injectTranslator[optional] whether translator should be injected when proxying. Default is true.
Returns:
Zend_View_Helper_Navigation fluent interface, returns self

Definition at line 300 of file Navigation.php.


The documentation for this class was generated from the following file: