View/Helper/Navigation/Links.php

Show: inherited
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 [email protected] 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: Links.php 25239 2013-01-22 09:45:01Z frosch $  

\Zend_View_Helper_Navigation_Links

Package: Zend\View\Helper

Helper for printing <link> elements

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

Constant  RENDER_ALTERNATE = 1
Constant  RENDER_STYLESHEET = 2
Constant  RENDER_START = 4
Constant  RENDER_NEXT = 8
Constant  RENDER_PREV = 16
Constant  RENDER_CONTENTS = 32
Constant  RENDER_INDEX = 64
Constant  RENDER_GLOSSARY = 128
Constant  RENDER_COPYRIGHT = 256
Constant  RENDER_CHAPTER = 512
Constant  RENDER_SECTION = 1024
Constant  RENDER_SUBSECTION = 2048
Constant  RENDER_APPENDIX = 4096
Constant  RENDER_HELP = 8192
Constant  RENDER_BOOKMARK = 16384
Constant  RENDER_CUSTOM = 32768
Constant  RENDER_ALL = 65535

Properties

Propertyprotectedarray $_RELATIONS = array(self::RENDER_ALTERNATE => 'alternate', self::RENDER_STYLESHEET => 'stylesheet', self::RENDER_START => 'start', self::RENDER_NEXT => 'next', self::RENDER_PREV => 'prev', self::RENDER_CONTENTS => 'contents', self::RENDER_INDEX => 'index', self::RENDER_GLOSSARY => 'glossary', self::RENDER_COPYRIGHT => 'copyright', self::RENDER_CHAPTER => 'chapter', self::RENDER_SECTION => 'section', self::RENDER_SUBSECTION => 'subsection', self::RENDER_APPENDIX => 'appendix', self::RENDER_HELP => 'help', self::RENDER_BOOKMARK => 'bookmark')
static

Maps render constants to W3C link types

Default valuearray(self::RENDER_ALTERNATE => 'alternate', self::RENDER_STYLESHEET => 'stylesheet', self::RENDER_START => 'start', self::RENDER_NEXT => 'next', self::RENDER_PREV => 'prev', self::RENDER_CONTENTS => 'contents', self::RENDER_INDEX => 'index', self::RENDER_GLOSSARY => 'glossary', self::RENDER_COPYRIGHT => 'copyright', self::RENDER_CHAPTER => 'chapter', self::RENDER_SECTION => 'section', self::RENDER_SUBSECTION => 'subsection', self::RENDER_APPENDIX => 'appendix', self::RENDER_HELP => 'help', self::RENDER_BOOKMARK => 'bookmark')Details
Type
array
Propertyprotected\Zend_Acl $_acl =
inherited

ACL to use when iterating pages

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_acl
Propertyprotectedstring $_closingBracket = null
Default valuenullDetails
Type
string
Inherited_from
\Zend_View_Helper_HtmlElement::$$_closingBracket  
Inherited_from
\Zend_View_Helper_Navigation_HelperAbstract::$$_closingBracket  
Propertyprotected\Zend_Navigation_Container $_container =
inherited

Container to operate on by default

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_container
Propertyprotected\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
Propertyprotectedstring|\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
Propertyprotectedbool $_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  
Propertyprotectedstring $_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  
Propertyprotectedint $_maxDepth =
inherited

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

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_maxDepth
Propertyprotectedint $_minDepth =
inherited

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

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_minDepth
Propertyprotectedstring|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  
Propertyprotectedint $_renderFlag = self::RENDER_ALL

The helper's render flag

Default valueself::RENDER_ALLDetails
Type
int
See
\global\render()  
See
\global\setRenderFlag()  
Propertyprotectedbool $_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  
Propertyprotectedstring|\Zend_Acl_Role_Interface $_role =
inherited

ACL role to use when iterating pages

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::$$_role
Propertyprotected\Zend_Navigation_Container $_root =

Root container

Used for preventing methods to traverse above the container given to the render() method.

Details
Type
\Zend_Navigation_Container
See
\global\_findRoot()  
Propertyprotectedbool $_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  
Propertyprotected\Zend_Translate_Adapter $_translator =
Propertyprotectedbool $_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  
Propertyprotectedbool $_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

Magic overload: Proxy calls to {@link findRelation()} or container

Examples of finder calls:

// METHOD                  // SAME AS
$h->findRelNext($page);    // $h->findRelation($page, 'rel', 'next')
$h->findRevSection($page); // $h->findRelation($page, 'rev', 'section');
$h->findRelFoo($page);     // $h->findRelation($page, 'rel', 'foo');
Parameters
Name Type Description
$method string

method name

$arguments array

method arguments

Returns
Type Description
mixed returns what the container returns
Throws
Exception Description
\Zend_Navigation_Exception if 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
Type Description
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
Name Type Description
$page \Zend_Navigation_Page

page to check

Returns
Type Description
bool whether page is accepted by ACL
methodprotected_convertToPages(mixed $mixed, bool $recursive = true) : \Zend_Navigation_Page | array | null

Converts a $mixed value to an array of pages

Parameters
Name Type Description
$mixed mixed

mixed value to get page(s) from

$recursive bool

whether $value should be looped if it is an array or a config

Returns
Type Description
\Zend_Navigation_Page | array | null empty if unable to convert
methodprotected_findFromProperty(\Zend_Navigation_Page $page, string $rel, string $type) : \Zend_Navigation_Page | array | null

Finds relations of given $type for $page by checking if the relation is specified as a property of $page

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relations for

$rel string

relation, 'rel' or 'rev'

$type string

link type, e.g. 'start', 'next'

Returns
Type Description
\Zend_Navigation_Page | array | null page(s), or null if not found
methodprotected_findFromSearch(\Zend_Navigation_Page $page, string $rel, string $type) : array | null

Finds relations of given $rel=$type for $page by using the helper to search for the relation in the root container

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relations for

$rel string

relation, 'rel' or 'rev'

$type string

link type, e.g. 'start', 'next', etc

Returns
Type Description
array | null array of pages, or null if not found
methodprotected_findRoot(\Zend_Navigaiton_Page $page) : \Zend_Navigation_Container

Returns the root container of the given page

When rendering a container, the render method still store the given container as the root container, and unset it when done rendering. This makes sure finder methods will not traverse above the container given to the render method.

Parameters
Name Type Description
$page \Zend_Navigaiton_Page

page to find root for

Returns
Type Description
\Zend_Navigation_Container the root container of the given page
methodprotected_getWhitespace(int | string $indent) : string
inherited

Retrieve whitespace representation of $indent

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::_getWhitespace()
Parameters
Name Type Description
$indent int | string
Returns
Type Description
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
Name Type Description
$attribs array

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

Returns
Type Description
string an attribute string
methodprotected_isStrictDoctype() : boolean
Returns
Type Description
boolean
methodprotected_isXhtml() : boolean
Returns
Type Description
boolean
methodprotected_normalizeId(string $value) : string
inherited

Normalize an ID

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::_normalizeId()
Parameters
Name Type Description
$value string

ID

Returns
Type Description
string Normalized ID
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
Name Type Description
$page \Zend_Navigation_Page

page to check

$recursive bool

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

Returns
Type Description
bool whether page should be accepted
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
Name Type Description
$container \Zend_Navigation_Container

container to search

$minDepth int | 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
Type Description
array an associative array with the values 'depth' and 'page', or an empty array if not found
methodpublicfindAllRelations(\Zend_Navigation_Page $page,  $flag = null) : array

Finds all relations (forward and reverse) for the given $page

The form of the returned array:

// $page denotes an instance of Zend_Navigation_Page
$returned = array(
    'rel' => array(
        'alternate' => array($page, $page, $page),
        'start'     => array($page),
        'next'      => array($page),
        'prev'      => array($page),
        'canonical' => array($page)
    ),
    'rev' => array(
        'section'   => array($page)
    )
);
Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find links for

$flag
Returns
Type Description
array related pages
methodpublicfindRelation(\Zend_Navigation_Page $page, string $rel, string $type) : \Zend_Navigaiton_Page | array | null

Finds relations of the given $rel=$type from $page

This method will first look for relations in the page instance, then by searching the root container if nothing was found in the page.

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relations for

$rel string

relation, "rel" or "rev"

$type string

link type, e.g. 'start', 'next'

Returns
Type Description
\Zend_Navigaiton_Page | array | null page(s), or null if not found
Throws
Exception Description
\Zend_View_Exception if $rel is not "rel" or "rev"
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
Type Description
\Zend_Acl | null ACL object or null
methodpublicgetClosingBracket() : string
Returns
Type Description
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
Type Description
\Zend_Navigation_Container navigation container
methodpublicgetEOL() : string
inherited

Returns the EOL character (format output is respected)

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getEOL()
Returns
Type Description
string standard EOL charater or an empty string
Details
See
\global\self::EOL  
See
\global\getFormatOutput()  
methodpublicgetFormatOutput() : bool
inherited

Returns whether HTML/XML output should be formatted

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getFormatOutput()
Returns
Type Description
bool whether HTML/XML output should be formatted
methodpublicgetIndent() : string
inherited

Returns indentation (format output is respected)

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getIndent()
Returns
Type Description
string indentation string or an empty string
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
Type Description
int | null maximum 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
Type Description
int | null minimum depth or null
methodpublicgetPrefixForId() : string
inherited

Returns prefix for IDs when they are normalized

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getPrefixForId()
Returns
Type Description
string Prefix for
methodpublicgetRenderFlag() : int

Returns the helper's render flag

Returns
Type Description
int render flag
methodpublicgetRenderInvisible() : bool
inherited

Return renderInvisible flag

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getRenderInvisible()
Returns
Type Description
bool
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
Type Description
string | \Zend_Acl_Role_Interface | null role or null
methodpublicgetTranslator() : \Zend_Translate_Adapter | null
inherited

Returns translator used in helper

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getTranslator()
Returns
Type Description
\Zend_Translate_Adapter | null translator or null
methodpublicgetUseAcl() : bool
inherited

Returns whether ACL should be used

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getUseAcl()
Returns
Type Description
bool whether ACL should be used
methodpublicgetUseTranslator() : bool
inherited

Returns whether translator should be used

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::getUseTranslator()
Returns
Type Description
bool whether translator should be used
methodpublichasAcl() : bool
inherited

Checks if the helper has an ACL instance

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::hasAcl()
Returns
Type Description
bool whether 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
Type Description
bool whether 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
Type Description
bool whether 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
Type Description
bool whether the helper has a translator or not
methodpublichtmlify(\Zend_Navigation_Page $page) : string
inherited

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

Inherited from: \Zend_View_Helper_Navigation_HelperAbstract::htmlify()
Parameters
Name Type Description
$page \Zend_Navigation_Page

page to generate HTML for

Returns
Type Description
string HTML string for the given page
methodpubliclinks(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_Navigation_Links

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

Parameters
Name Type Description
$container \Zend_Navigation_Container

[optional] container to operate on

Returns
Type Description
\Zend_View_Helper_Navigation_Links fluent interface, returns self
methodpublicrender(\Zend_Navigation_Container $container = null) : string

Renders helper

Parameters
Name Type Description
$container \Zend_Navigation_Container

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

Returns
Type Description
string helper output
Throws
Exception Description
\Zend_View_Exception if unable to render
methodpublicrenderLink(\Zend_Navigation_Page $page, string $attrib, string $relation) : string

Renders the given $page as a link element, with $attrib = $relation

Parameters
Name Type Description
$page \Zend_Navigation_Page

the page to render the link for

$attrib string

the attribute to use for $type, either 'rel' or 'rev'

$relation string

relation type, muse be one of; alternate, appendix, bookmark, chapter, contents, copyright, glossary, help, home, index, next, prev, section, start, stylesheet, subsection

Returns
Type Description
string rendered link element
Throws
Exception Description
\Zend_View_Exception if $attrib is invalid
methodpublicsearchRelChapter(\Zend_Navigation_Page $page) : \Zend_Navigation_Page | array | null

Searches the root container for forward 'chapter' relations of the given $page

From http://www.w3.org/TR/html4/types.html#type-links: Refers to a document serving as a chapter in a collection of documents.

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relation for

Returns
Type Description
\Zend_Navigation_Page | array | null page(s) or null
methodpublicsearchRelNext(\Zend_Navigation_Page $page) : \Zend_Navigation_Page | null

Searches the root container for the forward 'next' relation of the given $page

From http://www.w3.org/TR/html4/types.html#type-links: Refers to the next document in a linear sequence of documents. User agents may choose to preload the "next" document, to reduce the perceived load time.

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relation for

Returns
Type Description
\Zend_Navigation_Page | null page(s) or null
methodpublicsearchRelPrev(\Zend_Navigation_Page $page) : \Zend_Navigation_Page | null

Searches the root container for the forward 'prev' relation of the given $page

From http://www.w3.org/TR/html4/types.html#type-links: Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous".

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relation for

Returns
Type Description
\Zend_Navigation_Page | null page or null
methodpublicsearchRelSection(\Zend_Navigation_Page $page) : \Zend_Navigation_Page | array | null

Searches the root container for forward 'section' relations of the given $page

From http://www.w3.org/TR/html4/types.html#type-links: Refers to a document serving as a section in a collection of documents.

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relation for

Returns
Type Description
\Zend_Navigation_Page | array | null page(s) or null
methodpublicsearchRelStart(\Zend_Navigation_Page $page) : \Zend_Navigation_Page | null

Searches the root container for the forward 'start' relation of the given $page

From http://www.w3.org/TR/html4/types.html#type-links: Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection.

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relation for

Returns
Type Description
\Zend_Navigation_Page | null page or null
methodpublicsearchRelSubsection(\Zend_Navigation_Page $page) : \Zend_Navigation_Page | array | null

Searches the root container for forward 'subsection' relations of the given $page

From http://www.w3.org/TR/html4/types.html#type-links: Refers to a document serving as a subsection in a collection of documents.

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relation for

Returns
Type Description
\Zend_Navigation_Page | array | null page(s) or null
methodpublicsearchRevSection(\Zend_Navigation_Page $page) : \Zend_Navigation_Page | null

Searches the root container for the reverse 'section' relation of the given $page

From http://www.w3.org/TR/html4/types.html#type-links: Refers to a document serving as a section in a collection of documents.

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relation for

Returns
Type Description
\Zend_Navigation_Page | null page(s) or null
methodpublicsearchRevSubsection(\Zend_Navigation_Page $page) : \Zend_Navigation_Page | null

Searches the root container for the reverse 'section' relation of the given $page

From http://www.w3.org/TR/html4/types.html#type-links: Refers to a document serving as a subsection in a collection of documents.

Parameters
Name Type Description
$page \Zend_Navigation_Page

page to find relation for

Returns
Type Description
\Zend_Navigation_Page | null page(s) or null
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
Name Type Description
$acl \Zend_Acl

[optional] ACL object. Default is null.

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$container \Zend_Navigation_Container

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

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$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
Name Type Description
$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
Exception Description
\Zend_View_Exception if role is invalid
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
Name Type Description
$formatOutput bool

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

Returns
Type Description
\Zend_View_Helper_Navigation_Sitemap fluent 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
Name Type Description
$indent string | int

indentation string or number of spaces

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$maxDepth int

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

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$minDepth int

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

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$prefix string

Prefix for IDs

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent interface, returns self
methodpublicsetRenderFlag(int $renderFlag) : \Zend_View_Helper_Navigation_Links

Sets the helper's render flag

The helper uses the bitwise '&' operator against the hex values of the render constants. This means that the flag can is "bitwised" value of the render constants. Examples:

// render all links except glossary
$flag = Zend_View_Helper_Navigation_Links:RENDER_ALL ^
        Zend_View_Helper_Navigation_Links:RENDER_GLOSSARY;
$helper->setRenderFlag($flag);

// render only chapters and sections
$flag = Zend_View_Helper_Navigation_Links:RENDER_CHAPTER |
        Zend_View_Helper_Navigation_Links:RENDER_SECTION;
$helper->setRenderFlag($flag);

// render only relations that are not native W3C relations
$helper->setRenderFlag(Zend_View_Helper_Navigation_Links:RENDER_CUSTOM);

// render all relations (default)
$helper->setRenderFlag(Zend_View_Helper_Navigation_Links:RENDER_ALL);

Note that custom relations can also be rendered directly using the renderLink() method.

Parameters
Name Type Description
$renderFlag int

render flag

Returns
Type Description
\Zend_View_Helper_Navigation_Links fluent 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
Name Type Description
$renderInvisible bool

[optional] boolean flag

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$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.

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent interface, returns self
Throws
Exception Description
\Zend_View_Exception if $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
Name Type Description
$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
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$useAcl bool

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

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$useTranslator bool

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

Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent 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
Name Type Description
$flag bool
Returns
Type Description
\Zend_View_Helper_Navigation_HelperAbstract fluent interface, returns self
Documentation was generated by phpDocumentor 2.0.0a8.