API Documentation

Navigation/Page/Mvc.php

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Navigation  
subpackage
Page  
version
$Id: Mvc.php 24474 2011-09-26 19:46:23Z matthew $  

\Zend_Navigation_Page_Mvc

Represents a page that is defined using module, controller, action, route name and route params to assemble the href

Container class for Zend_Navigation_Page classes.

Extends from
\Zend_Navigation_Page
category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Navigation  
subpackage
Page  

Properties

Propertyprotectedstring  $_action= ''

Action name to use when assembling URL

Details
Type
string
Propertyprotectedstring  $_controller= ''

Controller name to use when assembling URL

Details
Type
string
Propertyprotectedbool  $_encodeUrl= 'true'

Whether href should be encoded when assembling URL

Default valuetrueDetails
Type
bool
see
\getHref()  
Propertyprotectedstring  $_hrefCache= ''

Cached href

The use of this variable minimizes execution time when getHref() is called more than once during the lifetime of a request. If a property is updated, the cache is invalidated.

Details
Type
string
Propertyprotectedstring  $_module= ''

Module name to use when assembling URL

Details
Type
string
Propertyprotectedarray  $_params= 'array'

Params to use when assembling URL

Default valuearrayDetails
Type
array
see
\getHref()  
Propertyprotectedbool  $_resetParams= 'true'

Whether params should be reset when assembling URL

Default valuetrueDetails
Type
bool
see
\getHref()  
Propertyprotectedstring  $_route= ''

Route name to use when assembling URL

Details
Type
string
see
\getHref()  
Propertyprotected\Zend_Controller_Action_Helper_Url  $_urlHelper= 'null'
static

Action helper for assembling URLs

Default valuenullDetails
Type
\Zend_Controller_Action_Helper_Url
see
\getHref()  

Methods

methodpublic__call( string $method, array $arguments ) : void

Magic overload: Proxy calls to finder methods

Inherited from: \Zend_Navigation_Container::__call()

Examples of finder calls:

// METHOD                    // SAME AS
$nav->findByLabel('foo');    // $nav->findOneBy('label', 'foo');
$nav->findOneByLabel('foo'); // $nav->findOneBy('label', 'foo');
$nav->findAllByClass('foo'); // $nav->findAllBy('class', 'foo');
Parameters
Name Type Description
$method string method name
$arguments array method arguments
Throws
Exception Description
\Zend_Navigation_Exception if method does not exist
methodpublic__construct( array|\Zend_Config $options = null ) : void

Page constructor

Inherited from: \Zend_Navigation_Page::__construct()
Parameters
Name Type Description
$options array|\Zend_Config

[optional] page options. Default is null, which should set defaults.

Throws
Exception Description
\Zend_Navigation_Exception if invalid options are given
methodpublic__get( string $name ) : mixed

Returns a property, or null if it doesn't exist

Inherited from: \Zend_Navigation_Page::__get()

Magic overload for enabling

$page->propname

.

Parameters
Name Type Description
$name string property name
Returns
Type Description
mixed property value or null
Throws
Exception Description
\Zend_Navigation_Exception if property name is invalid
methodpublic__isset( string $name ) : bool

Checks if a property is set

Inherited from: \Zend_Navigation_Page::__isset()

Magic overload for enabling

isset($page->propname)

.

Returns true if the property is native (id, class, title, etc), and true or false if it's a custom property (depending on whether the property actually is set).

Parameters
Name Type Description
$name string property name
Returns
Type Description
bool whether the given property exists
methodpublic__set( string $name, mixed $value ) : void

Sets a custom property

Inherited from: \Zend_Navigation_Page::__set()

Magic overload for enabling

$page->propname = $value

.

Parameters
Name Type Description
$name string property name
$value mixed value to set
Throws
Exception Description
\Zend_Navigation_Exception if property name is invalid
methodpublic__toString( ) : string

Returns page label

Inherited from: \Zend_Navigation_Page::__toString()

Magic overload for enabling

echo $page

.

Returns
Type Description
string page label
methodpublic__unset( string $name ) : void

Unsets the given custom property

Inherited from: \Zend_Navigation_Page::__unset()

Magic overload for enabling

unset($page->propname)

.

Parameters
Name Type Description
$name string property name
Throws
Exception Description
\Zend_Navigation_Exception if the property is native
methodprotected_init( ) : void

Initializes page (used by subclasses)

Inherited from: \Zend_Navigation_Page::_init()
methodprotected_normalizePropertyName( string $property ) : string
static

Normalizes a property name

Inherited from: \Zend_Navigation_Page::_normalizePropertyName()
Parameters
Name Type Description
$property string property name to normalize
Returns
Type Description
string normalized property name
methodprotected_sort( ) : void

Sorts the page index according to page order

Inherited from: \Zend_Navigation_Container::_sort()
methodpublicaddPage( \Zend_Navigation_Page|array|\Zend_Config $page ) : \Zend_Navigation_Container

Adds a page to the container

Inherited from: \Zend_Navigation_Container::addPage()

This method will inject the container as the given page's parent by calling {@link Zend_Navigation_Page::setParent()}.

Parameters
Name Type Description
$page \Zend_Navigation_Page|array|\Zend_Config page to add
Returns
Type Description
\Zend_Navigation_Container fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if page is invalid
methodpublicaddPages( array|\Zend_Config|\Zend_Navigation_Container $pages ) : \Zend_Navigation_Container

Adds several pages at once

Inherited from: \Zend_Navigation_Container::addPages()
Parameters
Name Type Description
$pages array|\Zend_Config|\Zend_Navigation_Container pages to add
Returns
Type Description
\Zend_Navigation_Container fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if $pages is not array, Zend_Config or Zend_Navigation_Container
methodpublicaddRel( string $relation, mixed $value ) : \Zend_Navigation_Page

Adds a forward relation to the page

Inherited from: \Zend_Navigation_Page::addRel()
Parameters
Name Type Description
$relation string

relation name (e.g. alternate, glossary, canonical, etc)

$value mixed value to set for relation
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublicaddRev( string $relation, mixed $value ) : \Zend_Navigation_Page

Adds a reverse relation to the page

Inherited from: \Zend_Navigation_Page::addRev()
Parameters
Name Type Description
$relation string

relation name (e.g. alternate, glossary, canonical, etc)

$value mixed value to set for relation
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpubliccount( ) : int

Returns number of pages in container

Inherited from: \Zend_Navigation_Container::count()

Implements Countable interface.

Returns
Type Description
int number of pages in the container
methodpubliccurrent( ) : \Zend_Navigation_Page

Returns current page

Inherited from: \Zend_Navigation_Container::current()

Implements RecursiveIterator interface.

Returns
Type Description
\Zend_Navigation_Page current page or null
Throws
Exception Description
\Zend_Navigation_Exception if the index is invalid
methodpublicfactory( array|\Zend_Config $options ) : \Zend_Navigation_Page
static

Factory for Zend_Navigation_Page classes

Inherited from: \Zend_Navigation_Page::factory()

A specific type to construct can be specified by specifying the key 'type' in $options. If type is 'uri' or 'mvc', the type will be resolved to Zend_Navigation_Page_Uri or Zend_Navigation_Page_Mvc. Any other value for 'type' will be considered the full name of the class to construct. A valid custom page class must extend Zend_Navigation_Page.

If 'type' is not given, the type of page to construct will be determined by the following rules: - If $options contains either of the keys 'action', 'controller', 'module', or 'route', a Zend_Navigation_Page_Mvc page will be created. - If $options contains the key 'uri', a Zend_Navigation_Page_Uri page will be created.

Parameters
Name Type Description
$options array|\Zend_Config options used for creating page
Returns
Type Description
\Zend_Navigation_Page a page instance
Throws
Exception Description
\Zend_Navigation_Exception if $options is not array/Zend_Config
\Zend_Exception if 'type' is specified and Zend_Loader is unable to load the class
\Zend_Navigation_Exception if something goes wrong during instantiation of the page
\Zend_Navigation_Exception if 'type' is given, and the specified type does not extend this class
\Zend_Navigation_Exception if unable to determine which class to instantiate
methodpublicfindAllBy( string $property, mixed $value ) : array

Returns all child pages matching $property == $value, or an empty array if no pages are found

Inherited from: \Zend_Navigation_Container::findAllBy()
Parameters
Name Type Description
$property string name of property to match against
$value mixed value to match property against
Returns
Type Description
array array containing only Zend_Navigation_Page instances
methodpublicfindBy( string $property, mixed $value, bool $all = false ) : \Zend_Navigation_Page|null

Returns page(s) matching $property == $value

Inherited from: \Zend_Navigation_Container::findBy()
Parameters
Name Type Description
$property string name of property to match against
$value mixed value to match property against
$all bool

[optional] whether an array of all matching pages should be returned, or only the first. If true, an array will be returned, even if not matching pages are found. If false, null will be returned if no matching page is found. Default is false.

Returns
Type Description
\Zend_Navigation_Pagenull matching page or null
methodpublicfindOneBy( string $property, mixed $value ) : \Zend_Navigation_Page|null

Returns a child page matching $property == $value, or null if not found

Inherited from: \Zend_Navigation_Container::findOneBy()
Parameters
Name Type Description
$property string name of property to match against
$value mixed value to match property against
Returns
Type Description
\Zend_Navigation_Pagenull matching page or null
methodpublicget( string $property ) : mixed

Returns the value of the given property

Inherited from: \Zend_Navigation_Page::get()

If the given property is native (id, class, title, etc), the matching get method will be used. Otherwise, it will return the matching custom property, or null if not found.

Parameters
Name Type Description
$property string property name
Returns
Type Description
mixed the property's value or null
Throws
Exception Description
\Zend_Navigation_Exception if property name is invalid
methodpublicgetAccesskey( ) : string|null

Returns page access key

Inherited from: \Zend_Navigation_Page::getAccesskey()
Returns
Type Description
stringnull page access key or null
methodpublicgetAction( ) : string|null

Returns action name to use when assembling URL

Returns
Type Description
stringnull action name
Details
see
\getHref()  
methodpublicgetActive( bool $recursive = false ) : bool

Proxy to isActive()

Inherited from: \Zend_Navigation_Page::getActive()
Parameters
Name Type Description
$recursive bool

[optional] whether page should be considered active if any child pages are active. Default is false.

Returns
Type Description
bool whether page should be considered active
methodpublicgetChildren( ) : \Zend_Navigation_Page|null

Returns the child container.

Inherited from: \Zend_Navigation_Container::getChildren()

Implements RecursiveIterator interface.

Returns
Type Description
\Zend_Navigation_Pagenull
methodpublicgetClass( ) : string|null

Returns page class (CSS)

Inherited from: \Zend_Navigation_Page::getClass()
Returns
Type Description
stringnull page's CSS class or null
methodpublicgetController( ) : string|null

Returns controller name to use when assembling URL

Returns
Type Description
stringnull controller name or null
Details
see
\getHref()  
methodpublicgetCustomProperties( ) : array

Returns custom properties as an array

Inherited from: \Zend_Navigation_Page::getCustomProperties()
Returns
Type Description
array an array containing custom properties
methodpublicgetDefaultPageType( ) : void
methodpublicgetDefinedRel( ) : array

Returns an array containing the defined forward relations

Inherited from: \Zend_Navigation_Page::getDefinedRel()
Returns
Type Description
array defined forward relations
methodpublicgetDefinedRev( ) : array

Returns an array containing the defined reverse relations

Inherited from: \Zend_Navigation_Page::getDefinedRev()
Returns
Type Description
array defined reverse relations
methodpublicgetEncodeUrl( ) : bool

Returns whether herf should be encoded when assembling URL

Returns
Type Description
bool whether herf should be encoded when assembling URL
Details
see
\getHref()  
methodpublicgetFragment( ) : string|null

Returns fragment identifier

Inherited from: \Zend_Navigation_Page::getFragment()
Returns
Type Description
stringnull fragment identifier
methodpublicgetHref( ) : string

Returns href for this page

This method uses {@link Zend_Controller_Action_Helper_Url} to assemble the href based on the page's properties.

Returns
Type Description
string page href
methodpublicgetId( ) : string|null

Returns page id

Inherited from: \Zend_Navigation_Page::getId()
Returns
Type Description
stringnull page id or null
methodpublicgetLabel( ) : string

Returns page label

Inherited from: \Zend_Navigation_Page::getLabel()
Returns
Type Description
string page label or null
methodpublicgetModule( ) : string|null

Returns module name to use when assembling URL

Returns
Type Description
stringnull module name or null
Details
see
\getHref()  
methodpublicgetOrder( ) : int|null

Returns page order used in parent container

Inherited from: \Zend_Navigation_Page::getOrder()
Returns
Type Description
intnull page order or null
methodpublicgetPages( ) : array

Returns pages in the container

Inherited from: \Zend_Navigation_Container::getPages()
Returns
Type Description
array array of Zend_Navigation_Page instances
methodpublicgetParams( ) : array

Returns params to use when assembling URL

Returns
Type Description
array page params
Details
see
\getHref()  
methodpublicgetParent( ) : \Zend_Navigation_Container|null

Returns parent container

Inherited from: \Zend_Navigation_Page::getParent()
Returns
Type Description
\Zend_Navigation_Containernull parent container or null
methodpublicgetPrivilege( ) : string|null

Returns ACL privilege associated with this page

Inherited from: \Zend_Navigation_Page::getPrivilege()
Returns
Type Description
stringnull ACL privilege or null
methodpublicgetRel( string $relation = null ) : array

Returns the page's forward links to other pages

Inherited from: \Zend_Navigation_Page::getRel()

This method returns an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page.

Parameters
Name Type Description
$relation string

[optional] name of relation to return. If not given, all relations will be returned.

Returns
Type Description
array an array of relations. If $relation is not specified, all relations will be returned in an associative array.
methodpublicgetResetParams( ) : bool

Returns whether params should be reset when assembling URL

Returns
Type Description
bool whether params should be reset when assembling URL
Details
see
\getHref()  
methodpublicgetResource( ) : string|\Zend_Acl_Resource_Interface|null

Returns ACL resource assoicated with this page

Inherited from: \Zend_Navigation_Page::getResource()
Returns
Type Description
string\Zend_Acl_Resource_Interfacenull ACL resource or null
methodpublicgetRev( string $relation = null ) : array

Returns the page's reverse links to other pages

Inherited from: \Zend_Navigation_Page::getRev()

This method returns an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page.

Parameters
Name Type Description
$relation string

[optional] name of relation to return. If not given, all relations will be returned.

Returns
Type Description
array an array of relations. If $relation is not specified, all relations will be returned in an associative array.
methodpublicgetRoute( ) : string

Returns route name to use when assembling URL

Returns
Type Description
string route name
Details
see
\getHref()  
methodpublicgetTarget( ) : string|null

Returns page target

Inherited from: \Zend_Navigation_Page::getTarget()
Returns
Type Description
stringnull page target or null
methodpublicgetTitle( ) : string|null

Returns page title

Inherited from: \Zend_Navigation_Page::getTitle()
Returns
Type Description
stringnull page title or null
methodpublicgetVisible( bool $recursive = false ) : bool

Proxy to isVisible()

Inherited from: \Zend_Navigation_Page::getVisible()

Returns a boolean value indicating whether the page is visible

Parameters
Name Type Description
$recursive bool

[optional] whether page should be considered invisible if parent is invisible. Default is false.

Returns
Type Description
bool whether page should be considered visible
methodpublichasChildren( ) : bool

Proxy to hasPages()

Inherited from: \Zend_Navigation_Container::hasChildren()

Implements RecursiveIterator interface.

Returns
Type Description
bool whether container has any pages
methodpublichasPage( \Zend_Navigation_Page $page, bool $recursive = false ) : bool

Checks if the container has the given page

Inherited from: \Zend_Navigation_Container::hasPage()
Parameters
Name Type Description
$page \Zend_Navigation_Page page to look for
$recursive bool

[optional] whether to search recursively. Default is false.

Returns
Type Description
bool whether page is in container
methodpublichasPages( ) : bool

Returns true if container contains any pages

Inherited from: \Zend_Navigation_Container::hasPages()
Returns
Type Description
bool whether container has any pages
methodpublichashCode( ) : string
final

Returns a hash code value for the page

Inherited from: \Zend_Navigation_Page::hashCode()
Returns
Type Description
string a hash code value for this page
methodpublicisActive( bool $recursive = false ) : bool

Returns whether page should be considered active or not

This method will compare the page properties against the request object that is found in the front controller.

Parameters
Name Type Description
$recursive bool

[optional] whether page should be considered active if any child pages are active. Default is false.

Returns
Type Description
bool whether page should be considered active or not
methodpublicisVisible( bool $recursive = false ) : bool

Returns a boolean value indicating whether the page is visible

Inherited from: \Zend_Navigation_Page::isVisible()
Parameters
Name Type Description
$recursive bool

[optional] whether page should be considered invisible if parent is invisible. Default is false.

Returns
Type Description
bool whether page should be considered visible
methodpublickey( ) : string

Returns hash code of current page

Inherited from: \Zend_Navigation_Container::key()

Implements RecursiveIterator interface.

Returns
Type Description
string hash code of current page
methodpublicnext( ) : void

Moves index pointer to next page in the container

Inherited from: \Zend_Navigation_Container::next()

Implements RecursiveIterator interface.

methodpublicnotifyOrderUpdated( ) : void

Notifies container that the order of pages are updated

Inherited from: \Zend_Navigation_Container::notifyOrderUpdated()
methodpublicremovePage( \Zend_Navigation_Page|int $page ) : bool

Removes the given page from the container

Inherited from: \Zend_Navigation_Container::removePage()
Parameters
Name Type Description
$page \Zend_Navigation_Page|int page to remove, either a page instance or a specific page order
Returns
Type Description
bool whether the removal was successful
methodpublicremovePages( ) : \Zend_Navigation_Container

Removes all pages in container

Inherited from: \Zend_Navigation_Container::removePages()
Returns
Type Description
\Zend_Navigation_Container fluent interface, returns self
methodpublicremoveRel( string $relation ) : \Zend_Navigation_Page

Removes a forward relation from the page

Inherited from: \Zend_Navigation_Page::removeRel()
Parameters
Name Type Description
$relation string name of relation to remove
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublicremoveRev( string $relation ) : \Zend_Navigation_Page

Removes a reverse relation from the page

Inherited from: \Zend_Navigation_Page::removeRev()
Parameters
Name Type Description
$relation string name of relation to remove
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublicrewind( ) : void

Sets index pointer to first page in the container

Inherited from: \Zend_Navigation_Container::rewind()

Implements RecursiveIterator interface.

methodpublicset( string $property, mixed $value ) : \Zend_Navigation_Page

Sets the given property

Inherited from: \Zend_Navigation_Page::set()

If the given property is native (id, class, title, etc), the matching set method will be used. Otherwise, it will be set as a custom property.

Parameters
Name Type Description
$property string property name
$value mixed value to set
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if property name is invalid
methodpublicsetAccesskey( string|null $character = null ) : \Zend_Navigation_Page

Sets access key for this page

Inherited from: \Zend_Navigation_Page::setAccesskey()
Parameters
Name Type Description
$character string|null

[optional] access key to set. Default is null, which sets no access key.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if access key is not string or null or if the string length not equal to one
methodpublicsetAction( string $action ) : \Zend_Navigation_Page_Mvc

Sets action name to use when assembling URL

Parameters
Name Type Description
$action string action name
Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid $action is given
Details
see
\getHref()  
methodpublicsetActive( bool $active = true ) : \Zend_Navigation_Page

Sets whether page should be considered active or not

Inherited from: \Zend_Navigation_Page::setActive()
Parameters
Name Type Description
$active bool

[optional] whether page should be considered active or not. Default is true.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublicsetClass( string|null $class = null ) : \Zend_Navigation_Page

Sets page CSS class

Inherited from: \Zend_Navigation_Page::setClass()
Parameters
Name Type Description
$class string|null

[optional] CSS class to set. Default is null, which sets no CSS class.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if not given string or null
methodpublicsetConfig( \Zend_Config $config ) : \Zend_Navigation_Page

Sets page properties using a Zend_Config object

Inherited from: \Zend_Navigation_Page::setConfig()
Parameters
Name Type Description
$config \Zend_Config config object to get properties from
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid options are given
methodpublicsetController( string|null $controller ) : \Zend_Navigation_Page_Mvc

Sets controller name to use when assembling URL

Parameters
Name Type Description
$controller string|null controller name
Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid controller name is given
Details
see
\getHref()  
methodpublicsetDefaultPageType(  $type = null ) : void
Parameters
Name Type Description
$type
methodpublicsetEncodeUrl(  $encodeUrl ) : \Zend_Navigation_Page_Mvc

Sets whether href should be encoded when assembling URL

Parameters
Name Type Description
$encodeUrl
Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Details
see
\getHref()  
methodpublicsetFragment( string $fragment ) : \Zend_Navigation_Page

Sets a fragment identifier

Inherited from: \Zend_Navigation_Page::setFragment()
Parameters
Name Type Description
$fragment string new fragment identifier
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if empty/no string is given
methodpublicsetId( string|null $id = null ) : \Zend_Navigation_Page

Sets page id

Inherited from: \Zend_Navigation_Page::setId()
Parameters
Name Type Description
$id string|null

[optional] id to set. Default is null, which sets no id.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if not given string or null
methodpublicsetLabel( string $label ) : \Zend_Navigation_Page

Sets page label

Inherited from: \Zend_Navigation_Page::setLabel()
Parameters
Name Type Description
$label string new page label
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if empty/no string is given
methodpublicsetModule( string|null $module ) : \Zend_Navigation_Page_Mvc

Sets module name to use when assembling URL

Parameters
Name Type Description
$module string|null module name
Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid module name is given
Details
see
\getHref()  
methodpublicsetOptions( array $options ) : \Zend_Navigation_Page

Sets page properties using options from an associative array

Inherited from: \Zend_Navigation_Page::setOptions()

Each key in the array corresponds to the according set*() method, and each word is separated by underscores, e.g. the option 'target' corresponds to setTarget(), and the option 'reset_params' corresponds to the method setResetParams().

Parameters
Name Type Description
$options array associative array of options to set
Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid options are given
methodpublicsetOrder( int $order = null ) : \Zend_Navigation_Page

Sets page order to use in parent container

Inherited from: \Zend_Navigation_Page::setOrder()
Parameters
Name Type Description
$order int

[optional] page order in container. Default is null, which sets no specific order.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if order is not integer or null
methodpublicsetPages( array $pages ) : \Zend_Navigation_Container

Sets pages this container should have, removing existing pages

Inherited from: \Zend_Navigation_Container::setPages()
Parameters
Name Type Description
$pages array pages to set
Returns
Type Description
\Zend_Navigation_Container fluent interface, returns self
methodpublicsetParams( array|null $params = null ) : \Zend_Navigation_Page_Mvc

Sets params to use when assembling URL

Parameters
Name Type Description
$params array|null

[optional] page params. Default is null which sets no params.

Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Details
see
\getHref()  
methodpublicsetParent( \Zend_Navigation_Container $parent = null ) : \Zend_Navigation_Page

Sets parent container

Inherited from: \Zend_Navigation_Page::setParent()
Parameters
Name Type Description
$parent \Zend_Navigation_Container

[optional] new parent to set. Default is null which will set no parent.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublicsetPrivilege( string|null $privilege = null ) : \Zend_Navigation_Page

Sets ACL privilege associated with this page

Inherited from: \Zend_Navigation_Page::setPrivilege()
Parameters
Name Type Description
$privilege string|null

[optional] ACL privilege to associate with this page. Default is null, which sets no privilege.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublicsetRel( array|\Zend_Config $relations = null ) : \Zend_Navigation_Page

Sets the page's forward links to other pages

Inherited from: \Zend_Navigation_Page::setRel()

This method expects an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page.

Parameters
Name Type Description
$relations array|\Zend_Config

[optional] an associative array of forward links to other pages

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublicsetResetParams( bool $resetParams ) : \Zend_Navigation_Page_Mvc

Sets whether params should be reset when assembling URL

Parameters
Name Type Description
$resetParams bool whether params should be reset when assembling URL
Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Details
see
\getHref()  
methodpublicsetResource( string|\Zend_Acl_Resource_Interface $resource = null ) : \Zend_Navigation_Page

Sets ACL resource assoicated with this page

Inherited from: \Zend_Navigation_Page::setResource()
Parameters
Name Type Description
$resource string|\Zend_Acl_Resource_Interface

[optional] resource to associate with page. Default is null, which sets no resource.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if $resource if invalid
methodpublicsetRev( array|\Zend_Config $relations = null ) : \Zend_Navigation_Page

Sets the page's reverse links to other pages

Inherited from: \Zend_Navigation_Page::setRev()

This method expects an associative array of reverse links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page.

Parameters
Name Type Description
$relations array|\Zend_Config

[optional] an associative array of reverse links to other pages

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublicsetRoute( string $route ) : \Zend_Navigation_Page_Mvc

Sets route name to use when assembling URL

Parameters
Name Type Description
$route string route name to use when assembling URL
Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid $route is given
Details
see
\getHref()  
methodpublicsetTarget( string|null $target = null ) : \Zend_Navigation_Page

Sets page target

Inherited from: \Zend_Navigation_Page::setTarget()
Parameters
Name Type Description
$target string|null

[optional] target to set. Default is null, which sets no target.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if target is not string or null
methodpublicsetTitle( string $title = null ) : \Zend_Navigation_Page

Sets page title

Inherited from: \Zend_Navigation_Page::setTitle()
Parameters
Name Type Description
$title string

[optional] page title. Default is null, which sets no title.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if not given string or null
methodpublicsetUrlHelper( \Zend_Controller_Action_Helper_Url $uh ) : void
static

Sets action helper for assembling URLs

Parameters
Name Type Description
$uh \Zend_Controller_Action_Helper_Url URL helper
Details
see
\getHref()  
methodpublicsetVisible( bool $visible = true ) : \Zend_Navigation_Page

Sets whether the page should be visible or not

Inherited from: \Zend_Navigation_Page::setVisible()
Parameters
Name Type Description
$visible bool

[optional] whether page should be considered visible or not. Default is true.

Returns
Type Description
\Zend_Navigation_Page fluent interface, returns self
methodpublictoArray( ) : array

Returns an array representation of the page

Returns
Type Description
array associative array containing all page properties
methodpublicvalid( ) : bool

Checks if container index is valid

Inherited from: \Zend_Navigation_Container::valid()

Implements RecursiveIterator interface.

Returns
Type Description
bool
Documentation was generated by DocBlox 0.13.3.