Helper for rendering menus from navigation containers

category Zend
package Zend_View
subpackage Helper
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_View_Helper_Navigation_HelperAbstract

 Methods

Magic overload: Proxy calls to the navigation container

__call(string $method, array $arguments = array()) : mixed
Inherited

Parameters

$method

string

method name in container

$arguments

array

[optional] arguments to pass

Exceptions

\Zend_Navigation_Exception if method does not exist in container

Returns

mixedreturns what the container returns

Magic overload: Proxy to {@link render()}.

__toString() : string
Inherited

This method will trigger an E_USER_ERROR if rendering the helper causes an exception to be thrown.

Implements Zend_View_Helper_Navigation_Helper::__toString().

inherited_from \Zend_View_Helper_Navigation_Helper::__toString()

Returns

string

Determines whether a page should be accepted when iterating

accept(\Zend_Navigation_Page $page, boolean $recursive = true) : boolean
Inherited

Rules:

  • If a page is not visible it is not accepted, unless RenderInvisible has been set to true.
  • If helper has no ACL, page is accepted
  • If helper has ACL, but no role, page is not accepted
  • If helper has ACL and role:
    • Page is accepted if it has no resource or privilege
    • Page is accepted if ACL allows page's resource or privilege
  • If page is accepted by the rules above and $recursive is true, the page will not be accepted if it is the descendant of a non-accepted page.

Parameters

$page

\Zend_Navigation_Page

page to check

$recursive

boolean

[optional] if true, page will not be accepted if it is the descendant of a page that is not accepted. Default is true.

Returns

booleanwhether page should be accepted

Adds CSS class from page to li element

addPageClassToLi(boolean $flag = true) : \Zend_View_Helper_Navigation_Menu

Before:

  • Bar
  • After:

  • Bar
  • Parameters

    $flag

    boolean

    [optional] adds CSS class from page to li element

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Strategy pattern: currently unutilized

    direct() : void
    Inherited
    inherited_from \Zend_View_Helper_Interface::direct()

    Finds the deepest active page in the given container

    findActive(\Zend_Navigation_Container $container, integer|null $minDepth = null, $maxDepth = -1) : array
    Inherited

    Parameters

    $container

    \Zend_Navigation_Container

    container to search

    $minDepth

    integernullintegernull

    [optional] minimum depth required for page to be valid. Default is to use {@link getMinDepth()}. A null value means no minimum depth required.

    $maxDepth

    Returns

    arrayan associative array with the values 'depth' and 'page', or an empty array if not found

    Returns ACL or null if it isn't set using {@link setAcl()} or {@link setDefaultAcl()}

    getAcl() : \Zend_Acl | null
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::getAcl()

    Returns

    \Zend_AclnullACL object or null

    Returns CSS class to use for the active elements when rendering

    getActiveClass() : string

    Returns

    stringCSS class

    Returns a flag indicating whether the CSS class from page to be added to li element

    getAddPageClassToLi() : boolean

    Returns

    boolean

    Get the tag closing bracket

    getClosingBracket() : string
    Inherited

    Returns

    string

    Returns the navigation container helper operates on by default

    getContainer() : \Zend_Navigation_Container
    Inherited

    Implements \Zend_View_Helper_Navigation_Interface::getContainer().

    If a helper is not explicitly set in this helper instance by calling \setContainer() or by passing it through the helper entry point, this method will look in Zend_Registry for a container by using the key 'Zend_Navigation'.

    If no container is set, and nothing is found in Zend_Registry, a new container will be instantiated and stored in the helper.

    inherited_from \Zend_View_Helper_Navigation_Helper::getContainer()

    Returns

    \Zend_Navigation_Containernavigation container

    Returns the EOL character (format output is respected)

    getEOL() : string
    Inherited
    see
    see

    Returns

    stringstandard EOL charater or an empty string

    Returns a flag indicating whether to expand all sibling nodes of the active branch

    getExpandSiblingNodesOfActiveBranch() : boolean

    By default, this value is false, meaning the entire menu will be be rendered.

    Returns

    booleanwhether siblings of nodes in the active branch should be expanded

    Returns whether HTML/XML output should be formatted

    getFormatOutput() : boolean
    Inherited

    Returns

    booleanwhether HTML/XML output should be formatted

    Returns indentation (format output is respected)

    getIndent() : string
    Inherited

    Returns

    stringindentation string or an empty string

    Returns inner indentation (format output is respected)

    getInnerIndent() : string
    see

    Returns

    stringindentation string or an empty string

    Returns maximum depth a page can have to be included when rendering

    getMaxDepth() : integer | null
    Inherited

    Returns

    integernullmaximum depth or null

    Returns minimum depth a page must have to be included when rendering

    getMinDepth() : integer | null
    Inherited

    Returns

    integernullminimum depth or null

    Returns a flag indicating whether only active branch should be rendered

    getOnlyActiveBranch() : boolean

    By default, this value is false, meaning the entire menu will be be rendered.

    Returns

    booleanwhether only active branch should be rendered

    Returns CSS class to use for the parent lie elements when rendering

    getParentClass() : string

    Returns

    stringCSS class

    Returns partial view script to use for rendering menu

    getPartial() : string | array | null

    Returns

    stringarraynull

    Returns prefix for IDs when they are normalized

    getPrefixForId() : string
    Inherited

    Returns

    stringPrefix for

    Return renderInvisible flag

    getRenderInvisible() : boolean
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::getRenderInvisible()

    Returns

    boolean

    Returns flag indicating whether parent class should be rendered to the li element

    getRenderParentClass() : boolean

    Returns

    booleanwhether parent class should be rendered

    Returns flag indicating whether parents should be rendered when rendering only the active branch

    getRenderParents() : boolean

    By default, this value is true.

    Returns

    booleanwhether parents should be rendered

    Returns ACL role to use when iterating pages, or null if it isn't set using {@link setRole()} or {@link setDefaultRole()}

    getRole() : string | \Zend_Acl_Role_Interface | null
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::getRole()

    Returns

    string\Zend_Acl_Role_Interfacenullrole or null

    Returns translator used in helper

    getTranslator() : \Zend_Translate_Adapter | null
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::getTranslator()

    Returns

    \Zend_Translate_Adapternulltranslator or null

    Returns CSS class to use for the first 'ul' element when rendering

    getUlClass() : string

    Returns

    stringCSS class

    Returns unique identifier (id) to use for the first 'ul' element when rendering

    getUlId() : string | null

    Returns

    stringnullUnique identifier (id); Default is 'null'

    Returns whether ACL should be used

    getUseAcl() : boolean
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::getUseAcl()

    Returns

    booleanwhether ACL should be used

    Returns whether translator should be used

    getUseTranslator() : boolean
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::getUseTranslator()

    Returns

    booleanwhether translator should be used

    Checks if the helper has an ACL instance

    hasAcl() : boolean
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::hasAcl()

    Returns

    booleanwhether the helper has a an ACL instance or not

    Checks if the helper has a container

    hasContainer() : boolean
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::hasContainer()

    Returns

    booleanwhether the helper has a container or not

    Checks if the helper has an ACL role

    hasRole() : boolean
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::hasRole()

    Returns

    booleanwhether the helper has a an ACL role or not

    Checks if the helper has a translator

    hasTranslator() : boolean
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::hasTranslator()

    Returns

    booleanwhether the helper has a translator or not

    Returns an HTML string containing an 'a' element for the given page if the page's href is not empty, and a 'span' element if it is empty

    htmlify(\Zend_Navigation_Page $page) : string

    Overrides \Zend_View_Helper_Navigation_Abstract::htmlify().

    inherited_from \Zend_View_Helper_Navigation_HelperAbstract::htmlify()

    Parameters

    $page

    \Zend_Navigation_Page

    page to generate HTML for

    Returns

    stringHTML string for the given page

    Returns an HTML string containing an 'a' element for the given page

    htmlify(\Zend_Navigation_Page $page) : string
    Inherited

    Parameters

    $page

    \Zend_Navigation_Page

    page to generate HTML for

    Returns

    stringHTML string for the given page

    View helper entry point: Retrieves helper and optionally sets container to operate on

    menu(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $container

    \Zend_Navigation_Container

    [optional] container to operate on

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Renders menu

    render(\Zend_Navigation_Container $container = null) : string

    Implements Zend_View_Helper_Navigation_Helper::render().

    If a partial view is registered in the helper, the menu will be rendered using the given partial script. If no partial is registered, the menu will be rendered as an 'ul' element by the helper's internal method.

    see
    see

    Parameters

    $container

    \Zend_Navigation_Container

    [optional] container to render. Default is to render the container registered in the helper.

    Returns

    stringhelper output

    Renders helper

    renderMenu(\Zend_Navigation_Container $container = null, array $options = array()) : string

    Renders a HTML 'ul' for the given $container. If $container is not given, the container registered in the helper will be used.

    Available $options:

    Parameters

    $container

    \Zend_Navigation_Container

    [optional] container to create menu from. Default is to use the container retrieved from {@link getContainer()}.

    $options

    array

    [optional] options for controlling rendering

    Returns

    stringrendered menu

    Renders the given $container by invoking the partial view helper

    renderPartial(\Zend_Navigation_Container $container = null, string|array $partial = null) : string

    The container will simply be passed on as a model to the view script as-is, and will be available in the partial script as 'container', e.g. echo 'Number of pages: ', count($this->container);.

    Parameters

    $container

    \Zend_Navigation_Container

    [optional] container to pass to view script. Default is to use the container registered in the helper.

    $partial

    stringarray

    [optional] partial view script to use. Default is to use the partial registered in the helper. If an array is given, it is expected to contain two values; the partial view script to use, and the module where the script can be found.

    Exceptions

    \Zend_View_Exception When no partial script is set

    Returns

    stringhelper output

    Renders the inner-most sub menu for the active page in the $container

    renderSubMenu(\Zend_Navigation_Container $container = null, string|null $ulClass = null, string|integer $indent = null, string|null $ulId = null, boolean $addPageClassToLi = false, string|integer $innerIndent = null) : string

    This is a convenience method which is equivalent to the following call: renderMenu($container, array( 'indent' => $indent, 'ulClass' => $ulClass, 'minDepth' => null, 'maxDepth' => null, 'onlyActiveBranch' => true, 'renderParents' => false ));

    Parameters

    $container

    \Zend_Navigation_Container

    [optional] container to render. Default is to render the container registered in the helper.

    $ulClass

    stringnull

    [optional] CSS class to use for UL element. Default is to use the value from {@link getUlClass()}.

    $indent

    stringinteger

    [optional] indentation as a string or number of spaces. Default is to use the value retrieved from {@link getIndent()}.

    $ulId

    stringnull

    [optional] Unique identifier (id) use for UL element

    $addPageClassToLi

    boolean

    adds CSS class from page to li element

    $innerIndent

    stringinteger

    [optional] inner indentation as a string or number of spaces. Default is to use the {@link getInnerIndent()}.

    Returns

    stringrendered content

    Sets ACL to use when iterating pages

    setAcl(\Zend_Acl $acl = null) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::setAcl()

    Parameters

    $acl

    \Zend_Acl

    [optional] ACL object. Default is null.

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Sets CSS class to use for the active elements when rendering

    setActiveClass(string $activeClass) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $activeClass

    string

    CSS class to set

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Sets navigation container the helper operates on by default

    setContainer(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited

    Implements \Zend_View_Helper_Navigation_Interface::setContainer().

    inherited_from \Zend_View_Helper_Navigation_Helper::setContainer()

    Parameters

    $container

    \Zend_Navigation_Container

    [optional] container to operate on. Default is null, meaning container will be reset.

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Sets default ACL to use if another ACL is not explicitly set

    setDefaultAcl(\Zend_Acl $acl = null) : void
    InheritedStatic

    Parameters

    $acl

    \Zend_Acl

    [optional] ACL object. Default is null, which sets no ACL object.

    Sets default ACL role(s) to use when iterating pages if not explicitly set later with {@link setRole()}

    setDefaultRole(mixed $role = null) : void
    InheritedStatic

    Parameters

    $role

    mixed

    [optional] role to set. Expects null, string, or an instance of {@link Zend_Acl_Role_Interface}. Default is null, which sets no default role.

    Exceptions

    \Zend_View_Exception if role is invalid

    Sets a flag indicating whether to expand all sibling nodes of the active branch

    setExpandSiblingNodesOfActiveBranch(boolean $flag = true) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $flag

    boolean

    [optional] expand all siblings of nodes in the active branch. Default is true.

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Sets whether HTML/XML output should be formatted

    setFormatOutput(boolean $formatOutput = true) : \Zend_View_Helper_Navigation_Sitemap
    Inherited

    Parameters

    $formatOutput

    boolean

    [optional] whether output should be formatted. Default is true.

    Returns

    \Zend_View_Helper_Navigation_Sitemapfluent interface, returns self

    Set the indentation string for using in {@link render()}, optionally a number of spaces to indent with

    setIndent(string|integer $indent) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited

    Parameters

    $indent

    stringinteger

    indentation string or number of spaces

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Set the inner indentation string for using in {@link render()}, optionally a number of spaces to indent with

    setInnerIndent(string|integer $indent) : \Zend_View_Helper_Navigation_HelperAbstract

    Parameters

    $indent

    stringinteger

    indentation string or number of spaces

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Sets the maximum depth a page can have to be included when rendering

    setMaxDepth(integer $maxDepth = null) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited

    Parameters

    $maxDepth

    integer

    [optional] maximum depth. Default is null, which sets no maximum depth.

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Sets the minimum depth a page must have to be included when rendering

    setMinDepth(integer $minDepth = null) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited

    Parameters

    $minDepth

    integer

    [optional] minimum depth. Default is null, which sets no minimum depth.

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Sets a flag indicating whether only active branch should be rendered

    setOnlyActiveBranch(boolean $flag = true) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $flag

    boolean

    [optional] render only active branch. Default is true.

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Sets CSS class to use for the parent li elements when rendering

    setParentClass(string $parentClass) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $parentClass

    string

    CSS class to set to parents

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Sets which partial view script to use for rendering menu

    setPartial(string|array $partial) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $partial

    stringarray

    partial view script or null. If an array is given, it is expected to contain two values; the partial view script to use, and the module where the script can be found.

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Sets prefix for IDs when they are normalized

    setPrefixForId(string $prefix) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited

    Parameters

    $prefix

    string

    Prefix for IDs

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Render invisible items?

    setRenderInvisible(boolean $renderInvisible = true) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::setRenderInvisible()

    Parameters

    $renderInvisible

    boolean

    [optional] boolean flag

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface returns self

    Enables/disables rendering of parent class to the li element

    setRenderParentClass(boolean $flag = true) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $flag

    boolean

    [optional] render with parent class. Default is true.

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Enables/disables rendering of parents when only rendering active branch

    setRenderParents(boolean $flag = true) : \Zend_View_Helper_Navigation_Menu

    See \setOnlyActiveBranch() for more information.

    Parameters

    $flag

    boolean

    [optional] render parents when rendering active branch. Default is true.

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Sets ACL role(s) to use when iterating pages

    setRole(mixed $role = null) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::setRole()

    Parameters

    $role

    mixed

    [optional] role to set. Expects a string, an instance of type {@link Zend_Acl_Role_Interface}, or null. Default is null, which will set no role.

    Exceptions

    \Zend_View_Exception if $role is invalid

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Sets translator to use in helper

    setTranslator(mixed $translator = null) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::setTranslator()

    Parameters

    $translator

    mixed

    [optional] translator. Expects an object of type {@link Zend_Translate_Adapter} or {@link Zend_Translate}, or null. Default is null, which sets no translator.

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Sets CSS class to use for the first 'ul' element when rendering

    setUlClass(string $ulClass) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $ulClass

    string

    CSS class to set

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Sets unique identifier (id) to use for the first 'ul' element when rendering

    setUlId(string|null $ulId) : \Zend_View_Helper_Navigation_Menu

    Parameters

    $ulId

    stringnull

    Unique identifier (id) to set

    Returns

    \Zend_View_Helper_Navigation_Menufluent interface, returns self

    Sets whether ACL should be used

    setUseAcl(boolean $useAcl = true) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::setUseAcl()

    Parameters

    $useAcl

    boolean

    [optional] whether ACL should be used. Default is true.

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Sets whether translator should be used

    setUseTranslator(boolean $useTranslator = true) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited
    inherited_from \Zend_View_Helper_Navigation_Helper::setUseTranslator()

    Parameters

    $useTranslator

    boolean

    [optional] whether translator should be used. Default is true.

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Set the View object

    setView(\Zend_View_Interface $view) : \Zend_View_Helper_Abstract
    Inherited
    inherited_from \Zend_View_Helper_Interface::setView()

    Parameters

    $view

    \Zend_View_Interface

    Returns

    \Zend_View_Helper_Abstract

    Skip the current prefix for IDs when they are normalized

    skipPrefixForId(boolean $flag = true) : \Zend_View_Helper_Navigation_HelperAbstract
    Inherited

    Parameters

    $flag

    boolean

    Returns

    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self

    Determines whether a page should be accepted by ACL when iterating

    _acceptAcl(\Zend_Navigation_Page $page) : boolean
    Inherited

    Rules:

    • If helper has no ACL, page is accepted
    • If page has a resource or privilege defined, page is accepted if the ACL allows access to it using the helper's role
    • If page has no resource or privilege, page is accepted

    Parameters

    $page

    \Zend_Navigation_Page

    page to check

    Returns

    booleanwhether page is accepted by ACL

    Retrieve whitespace representation of $indent

    _getWhitespace(integer|string $indent) : string
    Inherited

    Parameters

    $indent

    integerstring

    Returns

    string

    Converts an associative array to a string of tag attributes.

    _htmlAttribs(array $attribs) : string
    Inherited
    access public

    Parameters

    $attribs

    array

    From this array, each key-value pair is converted to an attribute name and value.

    Returns

    stringThe XHTML for the attributes.

    Is doctype HTML5?

    _isHtml5() : boolean
    Inherited

    Returns

    boolean

    Is doctype strict?

    _isStrictDoctype() : boolean
    Inherited

    Returns

    boolean

    Is doctype XHTML?

    _isXhtml() : boolean
    Inherited

    Returns

    boolean

    Normalize an ID

    _normalizeId(string $value) : string
    Inherited

    Parameters

    $value

    string

    Returns

    string

    Normalizes given render options

    _normalizeOptions(array $options = array()) : array

    Parameters

    $options

    array

    [optional] options to normalize

    Returns

    arraynormalized options

    Renders the deepest active menu within [$minDepth, $maxDeth], (called from {@link renderMenu()})

    _renderDeepestMenu(\Zend_Navigation_Container $container, string $ulClass, string $indent, string $innerIndent, integer|null $minDepth, integer|null $maxDepth, string|null $ulId, boolean $addPageClassToLi, string|null $activeClass, string $parentClass, boolean $renderParentClass) : string

    Parameters

    $container

    \Zend_Navigation_Container

    container to render

    $ulClass

    string

    CSS class for first UL

    $indent

    string

    initial indentation

    $innerIndent

    string

    inner indentation

    $minDepth

    integernull

    minimum depth

    $maxDepth

    integernull

    maximum depth

    $ulId

    stringnull

    unique identifier (id) for first UL

    $addPageClassToLi

    boolean

    adds CSS class from page to li element

    $activeClass

    stringnull

    CSS class for active element

    $parentClass

    string

    CSS class for parent li's

    $renderParentClass

    boolean

    Render parent class?

    Returns

    stringrendered menu (HTML)

    Renders a normal menu (called from {@link renderMenu()})

    _renderMenu(\Zend_Navigation_Container $container, string $ulClass, string $indent, string $innerIndent, integer|null $minDepth, integer|null $maxDepth, boolean $onlyActive, boolean $expandSibs, string|null $ulId, boolean $addPageClassToLi, string|null $activeClass, string $parentClass, boolean $renderParentClass) : string

    Parameters

    $container

    \Zend_Navigation_Container

    container to render

    $ulClass

    string

    CSS class for first UL

    $indent

    string

    initial indentation

    $innerIndent

    string

    inner indentation

    $minDepth

    integernull

    minimum depth

    $maxDepth

    integernull

    maximum depth

    $onlyActive

    boolean

    render only active branch?

    $expandSibs

    boolean

    render siblings of active branch nodes?

    $ulId

    stringnull

    unique identifier (id) for first UL

    $addPageClassToLi

    boolean

    adds CSS class from page to li element

    $activeClass

    stringnull

    CSS class for active element

    $parentClass

    string

    CSS class for parent li's

    $renderParentClass

    boolean

    Render parent class?

    Returns

    stringrendered menu (HTML)

     Properties

     

    View object

    $view : \Zend_View_Interface

    Default

    null
     

    ACL to use when iterating pages

    $_acl : \Zend_Acl

    Default

     

    CSS class to use for the active elements

    $_activeClass : string

    Default

    'active'
     

    Adds CSS class from page to li element

    $_addPageClassToLi : boolean

    Default

    false
     

    The tag closing bracket

    $_closingBracket : string

    Default

    null
     

    Container to operate on by default

    $_container : \Zend_Navigation_Container

    Default

     

    Default ACL to use when iterating pages if not explicitly set in the instance by calling {@link setAcl()}

    $_defaultAcl : \Zend_Acl

    Default

    Static
     

    Default ACL role to use when iterating pages if not explicitly set in the instance by calling {@link setRole()}

    $_defaultRole : string | \Zend_Acl_Role_Interface

    Default

    Static
     

    Expand all sibling nodes of active branch nodes

    $_expandSiblingNodesOfActiveBranch : boolean

    Default

    false
     

    Whether HTML/XML output should be formatted

    $_formatOutput : boolean

    Default

    true
     

    Indentation string

    $_indent : string

    Default

    ''
     

    Inner indentation string

    $_innerIndent : string

    Default

    ' '
     

    The maximum depth a page can have to be included when rendering

    $_maxDepth : integer

    Default

     

    The minimum depth a page must have to be included when rendering

    $_minDepth : integer

    Default

     

    Whether only active branch should be rendered

    $_onlyActiveBranch : boolean

    Default

    false
     

    CSS class to use for the parent li element

    $_parentClass : string

    Default

    'menu-parent'
     

    Partial view script to use for rendering menu

    $_partial : string | array

    Default

    null
     

    Prefix for IDs when they are normalized

    $_prefixForId : string | null

    Default

    null
     

    Wheter invisible items should be rendered by this helper

    $_renderInvisible : boolean

    Default

    false
     

    Whether parent li elements should be rendered with parent class

    $_renderParentClass : boolean

    Default

    false
     

    Whether parents should be rendered when only rendering active branch

    $_renderParents : boolean

    Default

    true
     

    ACL role to use when iterating pages

    $_role : string | \Zend_Acl_Role_Interface

    Default

     

    Skip current prefix for IDs when they are normalized (flag)

    $_skipPrefixForId : boolean

    Default

    false
     

    Translator

    $_translator : \Zend_Translate_Adapter

    Default

     

    CSS class to use for the ul element

    $_ulClass : string

    Default

    'navigation'
     

    Unique identifier (id) for the ul element

    $_ulId : string

    Default

    null
     

    Whether ACL should be used for filtering out pages

    $_useAcl : boolean

    Default

    true
     

    Whether translator should be used for page labels and titles

    $_useTranslator : boolean

    Default

    true

     Constants

     

    EOL character

    EOL = "\n"