API Documentation

View/Helper/Navigation.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_View
subpackage
Helper
version
$Id: Navigation.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_View_Helper_Navigation

Description

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.

Zend_View_Helper_Navigation

Extends from
Zend_View_Helper_Navigation_HelperAbstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_View
subpackage
Helper
Constants
NS
Properties
$_defaultProxy
$_helpers
$_injectContainer
$_injectAcl
$_injectTranslator
Methods
navigation
__call
findHelper
_inject
setDefaultProxy
getDefaultProxy
setInjectContainer
getInjectContainer
setInjectAcl
getInjectAcl
setInjectTranslator
getInjectTranslator
render

Description

Proxy helper for retrieving navigational helpers and forwarding calls

Constants

NS

string NS = 'Zend_View_Helper_Navigation'

View helper namespace

Details

value
Zend_View_Helper_Navigation
NS
string

Properties

$_defaultProxy

string $_defaultProxy = 'menu'

Default proxy to use in {@link render()}

Details

$_defaultProxy
string
visibility
protected
default
menu
final
false
static
false

$_helpers

array $_helpers = 'array'

Contains references to proxied helpers

Details

$_helpers
array
visibility
protected
default
array
final
false
static
false

$_injectAcl

bool $_injectAcl = 'true'

Whether ACL should be injected when proxying

Details

$_injectAcl
bool
visibility
protected
default
true
final
false
static
false

$_injectContainer

bool $_injectContainer = 'true'

Whether container should be injected when proxying

Details

$_injectContainer
bool
visibility
protected
default
true
final
false
static
false

$_injectTranslator

bool $_injectTranslator = 'true'

Whether translator should be injected when proxying

Details

$_injectTranslator
bool
visibility
protected
default
true
final
false
static
false

Methods

__call

__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');

Arguments
$method
string
helper name or method name in container
$arguments
array
[optional] arguments to pass
Output
mixed
returns what the proxied call returns
Details
visibility
public
final
false
static
false
throws
if proxying to a helper, and the helper is not an instance of the interface specified in {@link findHelper()}
throws
if method does not exist in container

_inject

_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

Arguments
$helper
Zend_View_Helper_Navigation_Helper
helper instance
Details
visibility
protected
final
false
static
false

findHelper

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}.

Arguments
$proxy
string
helper name
$strict
bool
[optional] whether exceptions should be thrown if something goes wrong. Default is true.
Output
Zend_View_Helper_Navigation_Helper
helper instance
Details
visibility
public
final
false
static
false
throws
if $strict is true and helper cannot be found
throws
if $strict is true and helper does not implement the specified interface

getDefaultProxy

getDefaultProxy( ) : string

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

Output
string
the default proxy to use in {@link render()}
Details
visibility
public
final
false
static
false

getInjectAcl

getInjectAcl( ) : bool

Returns whether ACL should be injected when proxying

Output
bool
whether ACL should be injected when proxying
Details
visibility
public
final
false
static
false

getInjectContainer

getInjectContainer( ) : bool

Returns whether container should be injected when proxying

Output
bool
whether container should be injected when proxying
Details
visibility
public
final
false
static
false

getInjectTranslator

getInjectTranslator( ) : bool

Returns whether translator should be injected when proxying

Output
bool
whether translator should be injected when proxying
Details
visibility
public
final
false
static
false

navigation

navigation( Zend_Navigation_Container $container = null ) : Zend_View_Helper_Navigation

Helper entry point

Arguments
$container
Zend_Navigation_Container
[optional] container to operate on
Output
Zend_View_Helper_Navigation
fluent interface, returns self
Details
visibility
public
final
false
static
false

render

render( Zend_Navigation_Container $container = null ) : string

Renders helper

Arguments
$container
Zend_Navigation_Container
[optional] container to render. Default is to render the container registered in the helper.
Output
string
helper output
Details
visibility
public
final
false
static
false
throws
if helper cannot be found
throws
if helper doesn't implement the interface specified in {@link findHelper()}

setDefaultProxy

setDefaultProxy( string $proxy ) : Zend_View_Helper_Navigation

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

Arguments
$proxy
string
default proxy
Output
Zend_View_Helper_Navigation
fluent interface, returns self
Details
visibility
public
final
false
static
false

setInjectAcl

setInjectAcl( bool $injectAcl = true ) : Zend_View_Helper_Navigation

Sets whether ACL should be injected when proxying

Arguments
$injectAcl
bool
[optional] whether ACL should be injected when proxying. Default is true.
Output
Zend_View_Helper_Navigation
fluent interface, returns self
Details
visibility
public
final
false
static
false

setInjectContainer

setInjectContainer( bool $injectContainer = true ) : Zend_View_Helper_Navigation

Sets whether container should be injected when proxying

Arguments
$injectContainer
bool
[optional] whether container should be injected when proxying. Default is true.
Output
Zend_View_Helper_Navigation
fluent interface, returns self
Details
visibility
public
final
false
static
false

setInjectTranslator

setInjectTranslator( bool $injectTranslator = true ) : Zend_View_Helper_Navigation

Sets whether translator should be injected when proxying

Arguments
$injectTranslator
bool
[optional] whether translator should be injected when proxying. Default is true.
Output
Zend_View_Helper_Navigation
fluent interface, returns self
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.