Class Zend_View_Helper_Navigation

Description

Proxy helper for retrieving navigational helpers and forwarding calls

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /View/Helper/Navigation.php (line 37)

Zend_View_Helper_Abstract
   |
   --Zend_View_Helper_HtmlElement
      |
      --Zend_View_Helper_Navigation_HelperAbstract
         |
         --Zend_View_Helper_Navigation
Class Constant Summary
 NS = 'Zend_View_Helper_Navigation'
Variable Summary
Method Summary
 Zend_View_Helper_Navigation_Helper findHelper (string $proxy, [bool $strict = true])
 string getDefaultProxy ()
 bool getInjectAcl ()
 Zend_View_Helper_Navigation navigation ([ $container = null])
 string render ([ $container = null])
 Zend_View_Helper_Navigation setInjectAcl ([bool $injectAcl = true])
 Zend_View_Helper_Navigation setInjectContainer ([bool $injectContainer = true])
 Zend_View_Helper_Navigation setInjectTranslator ([bool $injectTranslator = true])
 mixed __call (string $method, [ $arguments = array()])
Variables
string $_defaultProxy = 'menu' (line 52)

Default proxy to use in render()

  • access: protected
array $_helpers = array() (line 59)

Contains references to proxied helpers

  • access: protected
bool $_injectAcl = true (line 73)

Whether ACL should be injected when proxying

  • access: protected
bool $_injectContainer = true (line 66)

Whether container should be injected when proxying

  • access: protected
bool $_injectTranslator = true (line 80)

Whether translator should be injected when proxying

  • access: protected

Inherited Variables

Inherited from Zend_View_Helper_Navigation_HelperAbstract

Zend_View_Helper_Navigation_HelperAbstract::$_acl
Zend_View_Helper_Navigation_HelperAbstract::$_container
Zend_View_Helper_Navigation_HelperAbstract::$_defaultAcl
Zend_View_Helper_Navigation_HelperAbstract::$_defaultRole
Zend_View_Helper_Navigation_HelperAbstract::$_indent
Zend_View_Helper_Navigation_HelperAbstract::$_maxDepth
Zend_View_Helper_Navigation_HelperAbstract::$_minDepth
Zend_View_Helper_Navigation_HelperAbstract::$_renderInvisible
Zend_View_Helper_Navigation_HelperAbstract::$_role
Zend_View_Helper_Navigation_HelperAbstract::$_translator
Zend_View_Helper_Navigation_HelperAbstract::$_useAcl
Zend_View_Helper_Navigation_HelperAbstract::$_useTranslator

Inherited from Zend_View_Helper_HtmlElement

Zend_View_Helper_HtmlElement::$_closingBracket

Inherited from Zend_View_Helper_Abstract

Zend_View_Helper_Abstract::$view
Methods
findHelper (line 153)

Returns the helper matching $proxy

The helper must implement the interface Zend_View_Helper_Navigation_Helper.

  • return: helper instance
  • throws: Zend_View_Exception if $strict is true and helper does not implement the specified interface
  • throws: Zend_Loader_PluginLoader_Exception if $strict is true and helper cannot be found
  • access: public
Zend_View_Helper_Navigation_Helper findHelper (string $proxy, [bool $strict = true])
  • string $proxy: helper name
  • bool $strict: [optional] whether exceptions should be thrown if something goes wrong. Default is true.
getDefaultProxy (line 241)

Returns the default proxy to use in render()

  • return: the default proxy to use in render()
  • access: public
string getDefaultProxy ()
getInjectAcl (line 289)

Returns whether ACL should be injected when proxying

  • return: whether ACL should be injected when proxying
  • access: public
bool getInjectAcl ()
getInjectContainer (line 265)

Returns whether container should be injected when proxying

  • return: whether container should be injected when proxying
  • access: public
bool getInjectContainer ()
getInjectTranslator (line 313)

Returns whether translator should be injected when proxying

  • return: whether translator should be injected when proxying
  • access: public
bool getInjectTranslator ()
navigation (line 90)

Helper entry point

  • return: fluent interface, returns self
  • access: public
Zend_View_Helper_Navigation navigation ([ $container = null])
render (line 333)

Renders helper

  • return: helper output
  • throws: Zend_View_Exception if helper doesn't implement the interface specified in findHelper()
  • throws: Zend_Loader_PluginLoader_Exception if helper cannot be found
  • access: public
string render ([ $container = null])
  • Zend_Navigation_Container $container: [optional] container to render. Default is to render the container registered in the helper.
setDefaultProxy (line 230)

Sets the default proxy to use in render()

  • return: fluent interface, returns self
  • access: public
Zend_View_Helper_Navigation setDefaultProxy (string $proxy)
  • string $proxy: default proxy
setInjectAcl (line 278)

Sets whether ACL should be injected when proxying

  • return: fluent interface, returns self
  • access: public
Zend_View_Helper_Navigation setInjectAcl ([bool $injectAcl = true])
  • bool $injectAcl: [optional] whether ACL should be injected when proxying. Default is true.
setInjectContainer (line 254)

Sets whether container should be injected when proxying

  • return: fluent interface, returns self
  • access: public
Zend_View_Helper_Navigation setInjectContainer ([bool $injectContainer = true])
  • bool $injectContainer: [optional] whether container should be injected when proxying. Default is true.
setInjectTranslator (line 302)

Sets whether translator should be injected when proxying

  • return: fluent interface, returns self
  • access: public
Zend_View_Helper_Navigation setInjectTranslator ([bool $injectTranslator = true])
  • bool $injectTranslator: [optional] whether translator should be injected when proxying. Default is true.
_inject (line 202)

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

  • access: protected
void _inject (Zend_View_Helper_Navigation_Helper $helper)
__call (line 124)

Magic overload: Proxy to other navigation helpers or the container

Examples of usage from a view script or layout:

  1.  // proxy to Menu helper and render container:
  2.  echo $this->navigation()->menu();
  3.  
  4.  // proxy to Breadcrumbs helper and set indentation:
  5.  $this->navigation()->breadcrumbs()->setIndent(8);
  6.  
  7.  // proxy to container and find all pages with 'blog' route:
  8.  $blogPages $this->navigation()->findAllByRoute('blog');

  • return: returns what the proxied call returns
  • throws: Zend_Navigation_Exception if method does not exist in container
  • throws: Zend_View_Exception if proxying to a helper, and the helper is not an instance of the interface specified in findHelper()
  • access: public
mixed __call (string $method, [ $arguments = array()])
  • string $method: helper name or method name in container
  • array $arguments: [optional] arguments to pass

Redefinition of:
Zend_View_Helper_Navigation_HelperAbstract::__call()
Magic overload: Proxy calls to the navigation container

Inherited Methods

Inherited From Zend_View_Helper_Navigation_HelperAbstract

 Zend_View_Helper_Navigation_HelperAbstract::accept()
 Zend_View_Helper_Navigation_HelperAbstract::findActive()
 Zend_View_Helper_Navigation_HelperAbstract::getAcl()
 Zend_View_Helper_Navigation_HelperAbstract::getContainer()
 Zend_View_Helper_Navigation_HelperAbstract::getIndent()
 Zend_View_Helper_Navigation_HelperAbstract::getMaxDepth()
 Zend_View_Helper_Navigation_HelperAbstract::getMinDepth()
 Zend_View_Helper_Navigation_HelperAbstract::getRenderInvisible()
 Zend_View_Helper_Navigation_HelperAbstract::getRole()
 Zend_View_Helper_Navigation_HelperAbstract::getTranslator()
 Zend_View_Helper_Navigation_HelperAbstract::getUseAcl()
 Zend_View_Helper_Navigation_HelperAbstract::getUseTranslator()
 Zend_View_Helper_Navigation_HelperAbstract::hasAcl()
 Zend_View_Helper_Navigation_HelperAbstract::hasContainer()
 Zend_View_Helper_Navigation_HelperAbstract::hasRole()
 Zend_View_Helper_Navigation_HelperAbstract::hasTranslator()
 Zend_View_Helper_Navigation_HelperAbstract::htmlify()
 Zend_View_Helper_Navigation_HelperAbstract::setAcl()
 Zend_View_Helper_Navigation_HelperAbstract::setContainer()
 Zend_View_Helper_Navigation_HelperAbstract::setDefaultAcl()
 Zend_View_Helper_Navigation_HelperAbstract::setDefaultRole()
 Zend_View_Helper_Navigation_HelperAbstract::setIndent()
 Zend_View_Helper_Navigation_HelperAbstract::setMaxDepth()
 Zend_View_Helper_Navigation_HelperAbstract::setMinDepth()
 Zend_View_Helper_Navigation_HelperAbstract::setRenderInvisible()
 Zend_View_Helper_Navigation_HelperAbstract::setRole()
 Zend_View_Helper_Navigation_HelperAbstract::setTranslator()
 Zend_View_Helper_Navigation_HelperAbstract::setUseAcl()
 Zend_View_Helper_Navigation_HelperAbstract::setUseTranslator()
 Zend_View_Helper_Navigation_HelperAbstract::_acceptAcl()
 Zend_View_Helper_Navigation_HelperAbstract::_getWhitespace()
 Zend_View_Helper_Navigation_HelperAbstract::_htmlAttribs()
 Zend_View_Helper_Navigation_HelperAbstract::_normalizeId()
 Zend_View_Helper_Navigation_HelperAbstract::__call()
 Zend_View_Helper_Navigation_HelperAbstract::__toString()

Inherited From Zend_View_Helper_HtmlElement

 Zend_View_Helper_HtmlElement::getClosingBracket()
 Zend_View_Helper_HtmlElement::_htmlAttribs()
 Zend_View_Helper_HtmlElement::_isXhtml()
 Zend_View_Helper_HtmlElement::_normalizeId()

Inherited From Zend_View_Helper_Abstract

 Zend_View_Helper_Abstract::direct()
 Zend_View_Helper_Abstract::setView()
Class Constants
NS = 'Zend_View_Helper_Navigation' (line 45)

View helper namespace

Inherited Constants

Inherited from Zend_View_Helper_HtmlElement

Zend_View_Helper_HtmlElement::EOL

Documentation generated on Mon, 21 Jun 2010 15:35:15 -0400 by phpDocumentor 1.4.3