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 |
Definition at line 37 of file Navigation.php.
__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');
string | $method | helper name or method name in container |
array | $arguments | [optional] arguments to pass |
Zend_View_Exception | if proxying to a helper, and the helper is not an instance of the interface specified in findHelper() |
Zend_Navigation_Exception | if 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
Zend_View_Helper_Navigation_Helper | $helper | helper instance |
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.
string | $proxy | helper name |
bool | $strict | [optional] whether exceptions should be thrown if something goes wrong. Default is true. |
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 |
Definition at line 153 of file Navigation.php.
getDefaultProxy | ( | ) |
Returns the default proxy to use in render()
Definition at line 239 of file Navigation.php.
getInjectAcl | ( | ) |
Returns whether ACL should be injected when proxying
Definition at line 287 of file Navigation.php.
getInjectContainer | ( | ) |
Returns whether container should be injected when proxying
Definition at line 263 of file Navigation.php.
getInjectTranslator | ( | ) |
Returns whether translator should be injected when proxying
Definition at line 311 of file Navigation.php.
navigation | ( | Zend_Navigation_Container $ | container = null ) |
Helper entry point
Zend_Navigation_Container | $container | [optional] container to operate on |
Definition at line 90 of file Navigation.php.
render | ( | Zend_Navigation_Container $ | container = null ) |
Renders helper
Zend_Navigation_Container | $container | [optional] container to render. Default is to render the container registered in the helper. |
Zend_Loader_PluginLoader_Exception | if helper cannot be found |
Zend_View_Exception | if 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()
string | $proxy | default proxy |
Definition at line 228 of file Navigation.php.
setInjectAcl | ( | $ | injectAcl = true ) |
Sets whether ACL should be injected when proxying
bool | $injectAcl | [optional] whether ACL should be injected when proxying. Default is true. |
Definition at line 276 of file Navigation.php.
setInjectContainer | ( | $ | injectContainer = true ) |
Sets whether container should be injected when proxying
bool | $injectContainer | [optional] whether container should be injected when proxying. Default is true. |
Definition at line 252 of file Navigation.php.
setInjectTranslator | ( | $ | injectTranslator = true ) |
Sets whether translator should be injected when proxying
bool | $injectTranslator | [optional] whether translator should be injected when proxying. Default is true. |
Definition at line 300 of file Navigation.php.