View/Helper/Navigation/Menu.php

Show: PublicProtectedPrivateinherited
Table of Contents
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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_View  
Subpackage
Helper  
Version
$Id: Menu.php 25239 2013-01-22 09:45:01Z frosch $  

\Zend_View_Helper_Navigation_Menu

Package: Zend\View\Helper
Helper for rendering menus from navigation containers
Parent(s)
\Zend_View_Helper_Navigation_HelperAbstract < \Zend_View_Helper_HtmlElement < \Zend_View_Helper_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Properties

>VPropertyprotected\Zend_Acl $_acl
inherited
ACL to use when iterating pages
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_acl
>VPropertyprotectedstring $_activeClass = 'active'
CSS class to use for the active elements
Default value'active'Details
Type
string
>VPropertyprotectedbool $_addPageClassToLi = false
Adds CSS class from page to li element
Default valuefalseDetails
Type
bool
>VPropertyprotectedstring $_closingBracket = null
>VPropertyprotected\Zend_Navigation_Container $_container
inherited
Container to operate on by default
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_container
>VPropertyprotected\Zend_Acl $_defaultAcl
staticinherited
Default ACL to use when iterating pages if not explicitly set in the instance by calling {@link setAcl()}
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_defaultAcl
>VPropertyprotectedstring|\Zend_Acl_Role_Interface $_defaultRole
staticinherited
Default ACL role to use when iterating pages if not explicitly set in the instance by calling {@link setRole()}
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_defaultRole
>VPropertyprotectedbool $_expandSiblingNodesOfActiveBranch = false
Expand all sibling nodes of active branch nodes
Default valuefalseDetails
Type
bool
>VPropertyprotectedbool $_formatOutput = true
inherited
Whether HTML/XML output should be formatted
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_formatOutput
Default valuetrueDetails
Type
bool
Inherited_from
\Zend_View_Helper_Navigation_HelperAbstract::$$_formatOutput  
>VPropertyprotectedstring $_indent = ''
inherited
Indentation string
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_indent
Default value''Details
Type
string
Inherited_from
\Zend_View_Helper_Navigation_HelperAbstract::$$_indent  
>VPropertyprotectedstring $_innerIndent = ' '
Inner indentation string
Default value' 'Details
Type
string
>VPropertyprotectedint $_maxDepth
inherited
The maximum depth a page can have to be included when rendering
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_maxDepth
>VPropertyprotectedint $_minDepth
inherited
The minimum depth a page must have to be included when rendering
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_minDepth
>VPropertyprotectedbool $_onlyActiveBranch = false
Whether only active branch should be rendered
Default valuefalseDetails
Type
bool
>VPropertyprotectedstring $_parentClass = 'menu-parent'
CSS class to use for the parent li element
Default value'menu-parent'Details
Type
string
>VPropertyprotectedstring|array $_partial = null
Partial view script to use for rendering menu
Default valuenullDetails
Type
string | array
>VPropertyprotectedstring|null $_prefixForId = null
inherited
Prefix for IDs when they are normalized
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_prefixForId
Default valuenullDetails
Type
string | null
Inherited_from
\Zend_View_Helper_Navigation_HelperAbstract::$$_prefixForId  
>VPropertyprotectedbool $_renderInvisible = false
inherited
Wheter invisible items should be rendered by this helper
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_renderInvisible
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_View_Helper_Navigation_HelperAbstract::$$_renderInvisible  
>VPropertyprotectedbool $_renderParentClass = false
Whether parent li elements should be rendered with parent class
Default valuefalseDetails
Type
bool
>VPropertyprotectedbool $_renderParents = true
Whether parents should be rendered when only rendering active branch
Default valuetrueDetails
Type
bool
>VPropertyprotectedstring|\Zend_Acl_Role_Interface $_role
inherited
ACL role to use when iterating pages
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_role
>VPropertyprotectedbool $_skipPrefixForId = false
inherited
Skip current prefix for IDs when they are normalized (flag)
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_skipPrefixForId
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_View_Helper_Navigation_HelperAbstract::$$_skipPrefixForId  
>VPropertyprotected\Zend_Translate_Adapter $_translator
>VPropertyprotectedstring $_ulClass = 'navigation'
CSS class to use for the ul element
Default value'navigation'Details
Type
string
>VPropertyprotectedstring $_ulId = null
Unique identifier (id) for the ul element
Default valuenullDetails
Type
string
>VPropertyprotectedbool $_useAcl = true
inherited
Whether ACL should be used for filtering out pages
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_useAcl
Default valuetrueDetails
Type
bool
Inherited_from
\Zend_View_Helper_Navigation_HelperAbstract::$$_useAcl  
>VPropertyprotectedbool $_useTranslator = true
inherited
Whether translator should be used for page labels and titles
Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_useTranslator
Default valuetrueDetails
Type
bool
Inherited_from
\Zend_View_Helper_Navigation_HelperAbstract::$$_useTranslator  

Methods

methodpublic__call(string $method, array $arguments = array()) : mixed
inherited

Magic overload: Proxy calls to the navigation container

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::__call()
Parameters
NameTypeDescription
$methodstring

method name in container

$argumentsarray

[optional] arguments to pass

Returns
TypeDescription
mixedreturns what the container returns
Throws
ExceptionDescription
\Zend_Navigation_Exceptionif method does not exist in container
methodpublic__toString() : string
inherited

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

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::__toString()

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().

Returns
TypeDescription
string
methodprotected_acceptAcl(\Zend_Navigation_Page $page) : bool
inherited

Determines whether a page should be accepted by ACL when iterating

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::_acceptAcl()

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
NameTypeDescription
$page\Zend_Navigation_Page

page to check

Returns
TypeDescription
boolwhether page is accepted by ACL
methodprotected_getWhitespace(int | string $indent) : string
inherited

Retrieve whitespace representation of $indent

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::_getWhitespace()
Parameters
NameTypeDescription
$indentint | string
Returns
TypeDescription
string
methodprotected_htmlAttribs(array $attribs) : string
inherited

Converts an associative array to a string of tag attributes.

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::_htmlAttribs()
Parameters
NameTypeDescription
$attribsarray

an array where each key-value pair is converted to an attribute name and value

Returns
TypeDescription
stringan attribute string
methodprotected_isStrictDoctype() : boolean
Returns
TypeDescription
boolean
methodprotected_isXhtml() : boolean
Returns
TypeDescription
boolean
methodprotected_normalizeId(string $value) : string
inherited

Normalize an ID

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::_normalizeId()
Parameters
NameTypeDescription
$valuestring

ID

Returns
TypeDescription
stringNormalized ID
methodprotected_normalizeOptions(array $options = array()) : array

Normalizes given render options

Parameters
NameTypeDescription
$optionsarray

[optional] options to normalize

Returns
TypeDescription
arraynormalized options
methodprotected_renderDeepestMenu(\Zend_Navigation_Container $container, string $ulClass, string $indent, string $innerIndent, int | null $minDepth, int | null $maxDepth, string | null $ulId, bool $addPageClassToLi, string | null $activeClass, string $parentClass, bool $renderParentClass) : string

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

Parameters
NameTypeDescription
$container\Zend_Navigation_Container

container to render

$ulClassstring

CSS class for first UL

$indentstring

initial indentation

$innerIndentstring

inner indentation

$minDepthint | null

minimum depth

$maxDepthint | null

maximum depth

$ulIdstring | null

unique identifier (id) for first UL

$addPageClassToLibool

adds CSS class from page to li element

$activeClassstring | null

CSS class for active element

$parentClassstring

CSS class for parent li's

$renderParentClassbool

Render parent class?

Returns
TypeDescription
stringrendered menu (HTML)
methodprotected_renderMenu(\Zend_Navigation_Container $container, string $ulClass, string $indent, string $innerIndent, int | null $minDepth, int | null $maxDepth, bool $onlyActive, bool $expandSibs, string | null $ulId, bool $addPageClassToLi, string | null $activeClass, string $parentClass, bool $renderParentClass) : string

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

Parameters
NameTypeDescription
$container\Zend_Navigation_Container

container to render

$ulClassstring

CSS class for first UL

$indentstring

initial indentation

$innerIndentstring

inner indentation

$minDepthint | null

minimum depth

$maxDepthint | null

maximum depth

$onlyActivebool

render only active branch?

$expandSibsbool

render siblings of active branch nodes?

$ulIdstring | null

unique identifier (id) for first UL

$addPageClassToLibool

adds CSS class from page to li element

$activeClassstring | null

CSS class for active element

$parentClassstring

CSS class for parent li's

$renderParentClassbool

Render parent class?

Returns
TypeDescription
stringrendered menu (HTML)
methodpublicaccept(\Zend_Navigation_Page $page, bool $recursive = true) : bool
inherited

Determines whether a page should be accepted when iterating

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::accept()

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
NameTypeDescription
$page\Zend_Navigation_Page

page to check

$recursivebool

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

Returns
TypeDescription
boolwhether page should be accepted
methodpublicaddPageClassToLi(bool $flag = true) : \Zend_View_Helper_Navigation_Menu

Adds CSS class from page to li element

Before:

  • Bar
  • After:

  • Bar
  • Parameters
    NameTypeDescription
    $flagbool

    [optional] adds CSS class from page to li element

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicfindActive(\Zend_Navigation_Container $container, int | null | int | null $minDepth = null,  $maxDepth = -1) : array
    inherited

    Finds the deepest active page in the given container

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::findActive()
    Parameters
    NameTypeDescription
    $container\Zend_Navigation_Container

    container to search

    $minDepthint | null | int | null

    [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
    TypeDescription
    arrayan associative array with the values 'depth' and 'page', or an empty array if not found
    methodpublicgetAcl() : \Zend_Acl | null
    inherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getAcl()
    Returns
    TypeDescription
    \Zend_Acl | nullACL object or null
    methodpublicgetActiveClass() : string

    Returns CSS class to use for the active elements when rendering

    Returns
    TypeDescription
    stringCSS class
    methodpublicgetAddPageClassToLi() : bool

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

    Returns
    TypeDescription
    bool
    methodpublicgetClosingBracket() : string
    Returns
    TypeDescription
    string
    methodpublicgetContainer() : \Zend_Navigation_Container
    inherited

    Returns the navigation container helper operates on by default

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getContainer()

    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.

    Returns
    TypeDescription
    \Zend_Navigation_Containernavigation container
    methodpublicgetEOL() : string
    inherited

    Returns the EOL character (format output is respected)

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getEOL()
    Returns
    TypeDescription
    stringstandard EOL charater or an empty string
    Details
    See
    \self::EOL  
    See
    \getFormatOutput()  
    methodpublicgetExpandSiblingNodesOfActiveBranch() : bool

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

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

    Returns
    TypeDescription
    boolwhether siblings of nodes in the active branch should be expanded
    methodpublicgetFormatOutput() : bool
    inherited

    Returns whether HTML/XML output should be formatted

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getFormatOutput()
    Returns
    TypeDescription
    boolwhether HTML/XML output should be formatted
    methodpublicgetIndent() : string
    inherited

    Returns indentation (format output is respected)

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getIndent()
    Returns
    TypeDescription
    stringindentation string or an empty string
    methodpublicgetInnerIndent() : string

    Returns inner indentation (format output is respected)

    Returns
    TypeDescription
    stringindentation string or an empty string
    Details
    See
    \getFormatOutput()  
    methodpublicgetMaxDepth() : int | null
    inherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getMaxDepth()
    Returns
    TypeDescription
    int | nullmaximum depth or null
    methodpublicgetMinDepth() : int | null
    inherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getMinDepth()
    Returns
    TypeDescription
    int | nullminimum depth or null
    methodpublicgetOnlyActiveBranch() : bool

    Returns a flag indicating whether only active branch should be rendered

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

    Returns
    TypeDescription
    boolwhether only active branch should be rendered
    methodpublicgetParentClass() : string

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

    Returns
    TypeDescription
    stringCSS class
    methodpublicgetPartial() : string | array | null

    Returns partial view script to use for rendering menu

    Returns
    TypeDescription
    string | array | null
    methodpublicgetPrefixForId() : string
    inherited

    Returns prefix for IDs when they are normalized

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getPrefixForId()
    Returns
    TypeDescription
    stringPrefix for
    methodpublicgetRenderInvisible() : bool
    inherited

    Return renderInvisible flag

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getRenderInvisible()
    Returns
    TypeDescription
    bool
    methodpublicgetRenderParentClass() : bool

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

    Returns
    TypeDescription
    boolwhether parent class should be rendered
    methodpublicgetRenderParents() : bool

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

    By default, this value is true.

    Returns
    TypeDescription
    boolwhether parents should be rendered
    methodpublicgetRole() : string | \Zend_Acl_Role_Interface | null
    inherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getRole()
    Returns
    TypeDescription
    string | \Zend_Acl_Role_Interface | nullrole or null
    methodpublicgetTranslator() : \Zend_Translate_Adapter | null
    inherited

    Returns translator used in helper

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getTranslator()
    Returns
    TypeDescription
    \Zend_Translate_Adapter | nulltranslator or null
    methodpublicgetUlClass() : string

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

    Returns
    TypeDescription
    stringCSS class
    methodpublicgetUlId() : string | null

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

    Returns
    TypeDescription
    string | nullUnique identifier (id); Default is 'null'
    methodpublicgetUseAcl() : bool
    inherited

    Returns whether ACL should be used

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getUseAcl()
    Returns
    TypeDescription
    boolwhether ACL should be used
    methodpublicgetUseTranslator() : bool
    inherited

    Returns whether translator should be used

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getUseTranslator()
    Returns
    TypeDescription
    boolwhether translator should be used
    methodpublichasAcl() : bool
    inherited

    Checks if the helper has an ACL instance

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::hasAcl()
    Returns
    TypeDescription
    boolwhether the helper has a an ACL instance or not
    methodpublichasContainer() : bool
    inherited

    Checks if the helper has a container

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::hasContainer()
    Returns
    TypeDescription
    boolwhether the helper has a container or not
    methodpublichasRole() : bool
    inherited

    Checks if the helper has an ACL role

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::hasRole()
    Returns
    TypeDescription
    boolwhether the helper has a an ACL role or not
    methodpublichasTranslator() : bool
    inherited

    Checks if the helper has a translator

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::hasTranslator()
    Returns
    TypeDescription
    boolwhether the helper has a translator or not
    methodpublichtmlify(\Zend_Navigation_Page $page) : string

    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

    Parameters
    NameTypeDescription
    $page\Zend_Navigation_Page

    page to generate HTML for

    Returns
    TypeDescription
    stringHTML string for the given page
    methodpublicmenu(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_Navigation_Menu

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

    Parameters
    NameTypeDescription
    $container\Zend_Navigation_Container

    [optional] container to operate on

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicrender(\Zend_Navigation_Container $container = null) : string

    Renders menu

    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.

    Parameters
    NameTypeDescription
    $container\Zend_Navigation_Container

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

    Returns
    TypeDescription
    stringhelper output
    Throws
    ExceptionDescription
    \Zend_View_Exceptionif unable to render
    Details
    See
    \renderPartial()  
    See
    \renderMenu()  
    methodpublicrenderMenu(\Zend_Navigation_Container $container = null, array $options = array()) : string

    Renders helper

    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
    NameTypeDescription
    $container\Zend_Navigation_Container

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

    $optionsarray

    [optional] options for controlling rendering

    Returns
    TypeDescription
    stringrendered menu
    methodpublicrenderPartial(\Zend_Navigation_Container $container = null, string | array $partial = null) : string

    Renders the given $container by invoking the partial view helper

    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
    NameTypeDescription
    $container\Zend_Navigation_Container

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

    $partialstring | array

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

    Returns
    TypeDescription
    stringhelper output
    Throws
    ExceptionDescription
    \Zend_View_ExceptionWhen no partial script is set
    methodpublicrenderSubMenu(\Zend_Navigation_Container $container = null, string | null $ulClass = null, string | int $indent = null, string | null $ulId = null, bool $addPageClassToLi = false, string | int $innerIndent = null) : string

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

    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
    NameTypeDescription
    $container\Zend_Navigation_Container

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

    $ulClassstring | null

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

    $indentstring | int

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

    $ulIdstring | null

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

    $addPageClassToLibool

    adds CSS class from page to li element

    $innerIndentstring | int

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

    Returns
    TypeDescription
    stringrendered content
    methodpublicsetAcl(\Zend_Acl $acl = null) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Sets ACL to use when iterating pages

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setAcl()
    Parameters
    NameTypeDescription
    $acl\Zend_Acl

    [optional] ACL object. Default is null.

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetActiveClass(string $activeClass) : \Zend_View_Helper_Navigation_Menu

    Sets CSS class to use for the active elements when rendering

    Parameters
    NameTypeDescription
    $activeClassstring

    CSS class to set

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetContainer(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Sets navigation container the helper operates on by default

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setContainer()
    Parameters
    NameTypeDescription
    $container\Zend_Navigation_Container

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetDefaultAcl(\Zend_Acl $acl = null) : void
    staticinherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setDefaultAcl()
    Parameters
    NameTypeDescription
    $acl\Zend_Acl

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

    methodpublicsetDefaultRole(\midex $role = null) : void
    staticinherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setDefaultRole()
    Parameters
    NameTypeDescription
    $role\midex

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

    Throws
    ExceptionDescription
    \Zend_View_Exceptionif role is invalid
    methodpublicsetExpandSiblingNodesOfActiveBranch(bool $flag = true) : \Zend_View_Helper_Navigation_Menu

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

    Parameters
    NameTypeDescription
    $flagbool

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetFormatOutput(bool $formatOutput = true) : \Zend_View_Helper_Navigation_Sitemap
    inherited

    Sets whether HTML/XML output should be formatted

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setFormatOutput()
    Parameters
    NameTypeDescription
    $formatOutputbool

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Sitemapfluent interface, returns self
    methodpublicsetIndent(string | int $indent) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setIndent()
    Parameters
    NameTypeDescription
    $indentstring | int

    indentation string or number of spaces

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetInnerIndent(string | int $indent) : \Zend_View_Helper_Navigation_HelperAbstract

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

    Parameters
    NameTypeDescription
    $indentstring | int

    indentation string or number of spaces

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetMaxDepth(int $maxDepth = null) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setMaxDepth()
    Parameters
    NameTypeDescription
    $maxDepthint

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetMinDepth(int $minDepth = null) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

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

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setMinDepth()
    Parameters
    NameTypeDescription
    $minDepthint

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetOnlyActiveBranch(bool $flag = true) : \Zend_View_Helper_Navigation_Menu

    Sets a flag indicating whether only active branch should be rendered

    Parameters
    NameTypeDescription
    $flagbool

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetParentClass(string $parentClass) : \Zend_View_Helper_Navigation_Menu

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

    Parameters
    NameTypeDescription
    $parentClassstring

    CSS class to set to parents

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetPartial(string | array $partial) : \Zend_View_Helper_Navigation_Menu

    Sets which partial view script to use for rendering menu

    Parameters
    NameTypeDescription
    $partialstring | array

    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
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetPrefixForId(string $prefix) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Sets prefix for IDs when they are normalized

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setPrefixForId()
    Parameters
    NameTypeDescription
    $prefixstring

    Prefix for IDs

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetRenderInvisible(bool $renderInvisible = true) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Render invisible items?

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setRenderInvisible()
    Parameters
    NameTypeDescription
    $renderInvisiblebool

    [optional] boolean flag

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface returns self
    methodpublicsetRenderParentClass(bool $flag = true) : \Zend_View_Helper_Navigation_Menu

    Enables/disables rendering of parent class to the li element

    Parameters
    NameTypeDescription
    $flagbool

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetRenderParents(bool $flag = true) : \Zend_View_Helper_Navigation_Menu

    Enables/disables rendering of parents when only rendering active branch

    See setOnlyActiveBranch() for more information.

    Parameters
    NameTypeDescription
    $flagbool

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetRole(mixed $role = null) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Sets ACL role(s) to use when iterating pages

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setRole()
    Parameters
    NameTypeDescription
    $rolemixed

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    Throws
    ExceptionDescription
    \Zend_View_Exceptionif $role is invalid
    methodpublicsetTranslator(mixed $translator = null) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Sets translator to use in helper

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setTranslator()
    Parameters
    NameTypeDescription
    $translatormixed

    [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
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetUlClass(string $ulClass) : \Zend_View_Helper_Navigation_Menu

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

    Parameters
    NameTypeDescription
    $ulClassstring

    CSS class to set

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetUlId(string | null $ulId) : \Zend_View_Helper_Navigation_Menu

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

    Parameters
    NameTypeDescription
    $ulIdstring | null

    Unique identifier (id) to set

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_Menufluent interface, returns self
    methodpublicsetUseAcl(bool $useAcl = true) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Sets whether ACL should be used

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setUseAcl()
    Parameters
    NameTypeDescription
    $useAclbool

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicsetUseTranslator(bool $useTranslator = true) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Sets whether translator should be used

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::setUseTranslator()
    Parameters
    NameTypeDescription
    $useTranslatorbool

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

    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    methodpublicskipPrefixForId(bool $flag = true) : \Zend_View_Helper_Navigation_HelperAbstract
    inherited

    Skip the current prefix for IDs when they are normalized

    Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::skipPrefixForId()
    Parameters
    NameTypeDescription
    $flagbool
    Returns
    TypeDescription
    \Zend_View_Helper_Navigation_HelperAbstractfluent interface, returns self
    Documentation was generated by phpDocumentor 2.0.0a12.