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

AbstractContainer class for Zend\Navigation\Page classes.

category Zend
package Zend_Navigation
subpackage Page

 Methods

Magic overload: Proxy calls to finder methods

__call(string $method, array $arguments) 
Inherited

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

inherited_from \Zend\Navigation\AbstractContainer::__call()
inherited_from \Zend\Navigation\Page\AbstractPage::__call()

Parameters

$method

string

method name

$arguments

array

method arguments

Exceptions

\Zend\Navigation\Exception\BadMethodCallException if method does not exist

Page constructor

__construct(array | \Traversable $options) 
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::__construct()

Parameters

$options

array\Traversable

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if invalid options are given

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

__get(string $name) : mixed
Inherited

Magic overload for enabling

$page->propname

.

inherited_from \Zend\Navigation\Page\AbstractPage::__get()

Parameters

$name

string

property name

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if property name is invalid

Returns

mixedproperty value or null

Checks if a property is set

__isset(string $name) : bool
Inherited

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

inherited_from \Zend\Navigation\Page\AbstractPage::__isset()

Parameters

$name

string

property name

Returns

boolwhether the given property exists

Sets a custom property

__set(string $name, mixed $value) : void
Inherited

Magic overload for enabling

$page->propname = $value

.

inherited_from \Zend\Navigation\Page\AbstractPage::__set()

Parameters

$name

string

property name

$value

mixed

value to set

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if property name is invalid

Returns page label

__toString() : string
Inherited

Magic overload for enabling

echo $page

.

inherited_from \Zend\Navigation\Page\AbstractPage::__toString()

Returns

stringpage label

Unsets the given custom property

__unset(string $name) : void
Inherited

Magic overload for enabling

unset($page->propname)

.

inherited_from \Zend\Navigation\Page\AbstractPage::__unset()

Parameters

$name

string

property name

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if the property is native

Adds a page to the container

addPage(\Zend\Navigation\Page\AbstractPage | array | \Traversable $page) : \Zend\Navigation\AbstractContainer
Inherited

This method will inject the container as the given page's parent by calling Page\AbstractPage::setParent().

inherited_from \Zend\Navigation\AbstractContainer::addPage()
inherited_from \Zend\Navigation\Page\AbstractPage::addPage()

Parameters

$page

\Zend\Navigation\Page\AbstractPagearray\Traversable

page to add

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if page is invalid

Returns

\Zend\Navigation\AbstractContainerfluent interface, returns self

Adds several pages at once

addPages(array | \Traversable | \Zend\Navigation\AbstractContainer $pages) : \Zend\Navigation\AbstractContainer
Inherited

inherited_from \Zend\Navigation\AbstractContainer::addPages()
inherited_from \Zend\Navigation\Page\AbstractPage::addPages()

Parameters

$pages

array\Traversable\Zend\Navigation\AbstractContainer

pages to add

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if $pages is not array, Traversable or AbstractContainer

Returns

\Zend\Navigation\AbstractContainerfluent interface, returns self

Adds a forward relation to the page

addRel(string $relation, mixed $value) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::addRel()

Parameters

$relation

string

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

$value

mixed

value to set for relation

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Adds a reverse relation to the page

addRev(string $relation, mixed $value) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::addRev()

Parameters

$relation

string

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

$value

mixed

value to set for relation

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Returns number of pages in container

count() : int
Inherited

Implements Countable interface.

inherited_from \Zend\Navigation\AbstractContainer::count()
inherited_from \Zend\Navigation\Page\AbstractPage::count()

Returns

intnumber of pages in the container

Returns current page

current() : \Zend\Navigation\Page\AbstractPage
Inherited

Implements RecursiveIterator interface.

inherited_from \Zend\Navigation\AbstractContainer::current()
inherited_from \Zend\Navigation\Page\AbstractPage::current()

Exceptions

\Zend\Navigation\Exception\OutOfBoundsException if the index is invalid

Returns

Factory for Zend_Navigation_Page classes

factory(array | \Traversable $options) : \Zend\Navigation\Page\AbstractPage
Inherited

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', 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.

inherited_from \Zend\Navigation\Page\AbstractPage::factory()

Parameters

$options

array\Traversable

options used for creating page

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if $options is not array/Traversable
\Zend\Navigation\Exception\InvalidArgumentException if 'type' is specified but class not found
\Zend\Navigation\Exception\InvalidArgumentException if something goes wrong during instantiation of the page
\Zend\Navigation\Exception\InvalidArgumentException if 'type' is given, and the specified type does not extend this class
\Zend\Navigation\Exception\InvalidArgumentException if unable to determine which class to instantiate

Returns

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

findAllBy(string $property, mixed $value) : array
Inherited

inherited_from \Zend\Navigation\AbstractContainer::findAllBy()
inherited_from \Zend\Navigation\Page\AbstractPage::findAllBy()

Parameters

$property

string

name of property to match against

$value

mixed

value to match property against

Returns

arrayarray containing only Page\AbstractPage instances

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

findBy(string $property, mixed $value, bool $all) : \Zend\Navigation\Page\AbstractPage | null
Inherited

inherited_from \Zend\Navigation\AbstractContainer::findBy()
inherited_from \Zend\Navigation\Page\AbstractPage::findBy()

Parameters

$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

\Zend\Navigation\Page\AbstractPagenullmatching page or null

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

findOneBy(string $property, mixed $value) : \Zend\Navigation\Page\AbstractPage | null
Inherited

inherited_from \Zend\Navigation\AbstractContainer::findOneBy()
inherited_from \Zend\Navigation\Page\AbstractPage::findOneBy()

Parameters

$property

string

name of property to match against

$value

mixed

value to match property against

Returns

\Zend\Navigation\Page\AbstractPagenullmatching page or null

Returns the value of the given property

get(string $property) : mixed
Inherited

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.

inherited_from \Zend\Navigation\Page\AbstractPage::get()

Parameters

$property

string

property name

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if property name is invalid

Returns

mixedthe property's value or null

Returns action name to use when assembling URL

getAction() : string | null

see \Zend\Navigation\Page\getHref()

Returns

stringnullaction name

Proxy to isActive()

getActive(bool $recursive) : bool
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getActive()

Parameters

$recursive

bool

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

Returns

boolwhether page should be considered active

Returns the child container.

getChildren() : \Zend\Navigation\Page\AbstractPage | null
Inherited

Implements RecursiveIterator interface.

inherited_from \Zend\Navigation\AbstractContainer::getChildren()
inherited_from \Zend\Navigation\Page\AbstractPage::getChildren()

Returns

Returns page class (CSS)

getClass() : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getClass()

Returns

stringnullpage's CSS class or null

Returns controller name to use when assembling URL

getController() : string | null

see \Zend\Navigation\Page\getHref()

Returns

stringnullcontroller name or null

Returns custom properties as an array

getCustomProperties() : array
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getCustomProperties()

Returns

arrayan array containing custom properties

Gets the default router for assembling URLs.

getDefaultRouter() : \Zend\Mvc\Router\RouteStackInterface

Returns an array containing the defined forward relations

getDefinedRel() : array
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getDefinedRel()

Returns

arraydefined forward relations

Returns an array containing the defined reverse relations

getDefinedRev() : array
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getDefinedRev()

Returns

arraydefined reverse relations

Returns fragment identifier

getFragment() : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getFragment()

Returns

stringnullfragment identifier

Returns href for this page

getHref() : string

This method uses RouteStackInterface to assemble the href based on the page's properties.

see \Zend\Mvc\Router\RouteStackInterface

Exceptions

\Zend\Navigation\Exception\DomainException if no router is set

Returns

stringpage href

Returns page id

getId() : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getId()

Returns

stringnullpage id or null

Returns page label

getLabel() : string
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getLabel()

Returns

stringpage label or null

Returns page order used in parent container

getOrder() : int | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getOrder()

Returns

intnullpage order or null

Returns pages in the container

getPages() : array
Inherited

inherited_from \Zend\Navigation\AbstractContainer::getPages()
inherited_from \Zend\Navigation\Page\AbstractPage::getPages()

Returns

arrayarray of Page\AbstractPage instances

Returns params to use when assembling URL

getParams() : array

see \Zend\Navigation\Page\getHref()

Returns

arraypage params

Returns parent container

getParent() : \Zend\Navigation\AbstractContainer | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getParent()

Returns

\Zend\Navigation\AbstractContainernullparent container or null

Returns ACL privilege associated with this page

getPrivilege() : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getPrivilege()

Returns

stringnullACL privilege or null

Returns the page's forward links to other pages

getRel(string $relation) : array
Inherited

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.

inherited_from \Zend\Navigation\Page\AbstractPage::getRel()

Parameters

$relation

string

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

Returns

arrayan array of relations. If $relation is not specified, all relations will be returned in an associative array.

Returns ACL resource associated with this page

getResource() : string | \Zend\Permissions\Acl\Resource\ResourceInterface | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getResource()

Returns

Returns the page's reverse links to other pages

getRev(string $relation) : array
Inherited

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.

inherited_from \Zend\Navigation\Page\AbstractPage::getRev()

Parameters

$relation

string

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

Returns

arrayan array of relations. If $relation is not specified, all relations will be returned in an associative array.

Returns route name to use when assembling URL

getRoute() : string

see \Zend\Navigation\Page\getHref()

Returns

stringroute name

Get the route match.

getRouteMatch() : \Zend\Mvc\Router\RouteMatch

Get the router.

getRouter() : null | \Zend\Mvc\Router\RouteStackInterface

Returns page target

getTarget() : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getTarget()

Returns

stringnullpage target or null

Returns page title

getTitle() : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::getTitle()

Returns

stringnullpage title or null

Proxy to isVisible()

getVisible(bool $recursive) : bool
Inherited

Returns a boolean value indicating whether the page is visible

inherited_from \Zend\Navigation\Page\AbstractPage::getVisible()

Parameters

$recursive

bool

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

Returns

boolwhether page should be considered visible

Proxy to hasPages()

hasChildren() : bool
Inherited

Implements RecursiveIterator interface.

inherited_from \Zend\Navigation\AbstractContainer::hasChildren()
inherited_from \Zend\Navigation\Page\AbstractPage::hasChildren()

Returns

boolwhether container has any pages

Checks if the container has the given page

hasPage(\Zend\Navigation\Page\AbstractPage $page, bool $recursive) : bool
Inherited

inherited_from \Zend\Navigation\AbstractContainer::hasPage()
inherited_from \Zend\Navigation\Page\AbstractPage::hasPage()

Parameters

$page

\Zend\Navigation\Page\AbstractPage

page to look for

$recursive

bool

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

Returns

boolwhether page is in container

Returns true if container contains any pages

hasPages() : bool
Inherited

inherited_from \Zend\Navigation\AbstractContainer::hasPages()
inherited_from \Zend\Navigation\Page\AbstractPage::hasPages()

Returns

boolwhether container has any pages

Returns a hash code value for the page

hashCode() : string
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::hashCode()

Returns

stringa hash code value for this page

Returns whether page should be considered active or not

isActive(bool $recursive) : bool

This method will compare the page properties against the route matches composed in the object.

Parameters

$recursive

bool

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

Returns

boolwhether page should be considered active or not

Returns a boolean value indicating whether the page is visible

isVisible(bool $recursive) : bool
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::isVisible()

Parameters

$recursive

bool

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

Returns

boolwhether page should be considered visible

Returns hash code of current page

key() : string
Inherited

Implements RecursiveIterator interface.

inherited_from \Zend\Navigation\AbstractContainer::key()
inherited_from \Zend\Navigation\Page\AbstractPage::key()

Returns

stringhash code of current page

Notifies container that the order of pages are updated

notifyOrderUpdated() : void
Inherited

inherited_from \Zend\Navigation\AbstractContainer::notifyOrderUpdated()
inherited_from \Zend\Navigation\Page\AbstractPage::notifyOrderUpdated()

Removes the given page from the container

removePage(\Zend\Navigation\Page\AbstractPage | int $page) : bool
Inherited

inherited_from \Zend\Navigation\AbstractContainer::removePage()
inherited_from \Zend\Navigation\Page\AbstractPage::removePage()

Parameters

$page

\Zend\Navigation\Page\AbstractPageint

page to remove, either a page instance or a specific page order

Returns

boolwhether the removal was successful

Removes all pages in container

removePages() : \Zend\Navigation\AbstractContainer
Inherited

inherited_from \Zend\Navigation\AbstractContainer::removePages()
inherited_from \Zend\Navigation\Page\AbstractPage::removePages()

Returns

\Zend\Navigation\AbstractContainerfluent interface, returns self

Removes a forward relation from the page

removeRel(string $relation) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::removeRel()

Parameters

$relation

string

name of relation to remove

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Removes a reverse relation from the page

removeRev(string $relation) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::removeRev()

Parameters

$relation

string

name of relation to remove

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets index pointer to first page in the container

rewind() : void
Inherited

Implements RecursiveIterator interface.

inherited_from \Zend\Navigation\AbstractContainer::rewind()
inherited_from \Zend\Navigation\Page\AbstractPage::rewind()

Sets the given property

set(string $property, mixed $value) : \Zend\Navigation\Page\AbstractPage
Inherited

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.

inherited_from \Zend\Navigation\Page\AbstractPage::set()

Parameters

$property

string

property name

$value

mixed

value to set

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if property name is invalid

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets action name to use when assembling URL

setAction(string $action) : \Zend\Navigation\Page\Mvc

see \Zend\Navigation\Page\getHref()

Parameters

$action

string

action name

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if invalid $action is given

Returns

\Zend\Navigation\Page\Mvcfluent interface, returns self

Sets whether page should be considered active or not

setActive(bool $active) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setActive()

Parameters

$active

bool

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

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets page CSS class

setClass(string | null $class) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setClass()

Parameters

$class

stringnull

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if not given string or null

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets controller name to use when assembling URL

setController(string | null $controller) : \Zend\Navigation\Page\Mvc

see \Zend\Navigation\Page\getHref()

Parameters

$controller

stringnull

controller name

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if invalid controller name is given

Returns

\Zend\Navigation\Page\Mvcfluent interface, returns self

Sets the default router for assembling URLs.

setDefaultRouter(\Zend\Mvc\Router\RouteStackInterface $router) : void

see \Zend\Navigation\Page\getHref()

Parameters

Sets a fragment identifier

setFragment(string $fragment) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setFragment()

Parameters

$fragment

string

new fragment identifier

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if empty/no string is given

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets page id

setId(string | null $id) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setId()

Parameters

$id

stringnull

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if not given string or null

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets page label

setLabel(string $label) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setLabel()

Parameters

$label

string

new page label

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if empty/no string is given

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets page properties using options from an associative array

setOptions(array $options) : \Zend\Navigation\Page\AbstractPage
Inherited

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

inherited_from \Zend\Navigation\Page\AbstractPage::setOptions()

Parameters

$options

array

associative array of options to set

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if invalid options are given

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets page order to use in parent container

setOrder(int $order) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setOrder()

Parameters

$order

int

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if order is not integer or null

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets pages this container should have, removing existing pages

setPages(array $pages) : \Zend\Navigation\AbstractContainer
Inherited

inherited_from \Zend\Navigation\AbstractContainer::setPages()
inherited_from \Zend\Navigation\Page\AbstractPage::setPages()

Parameters

$pages

array

pages to set

Returns

\Zend\Navigation\AbstractContainerfluent interface, returns self

Sets params to use when assembling URL

setParams(array $params) : \Zend\Navigation\Page\Mvc

see \Zend\Navigation\Page\getHref()

Parameters

$params

arraynull

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

Returns

\Zend\Navigation\Page\Mvcfluent interface, returns self

Sets parent container

setParent(\Zend\Navigation\AbstractContainer $parent) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setParent()

Parameters

$parent

\Zend\Navigation\AbstractContainer

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets ACL privilege associated with this page

setPrivilege(string | null $privilege) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setPrivilege()

Parameters

$privilege

stringnull

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

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets the page's forward links to other pages

setRel(array | \Traversable $relations) : \Zend\Navigation\Page\AbstractPage
Inherited

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.

inherited_from \Zend\Navigation\Page\AbstractPage::setRel()

Parameters

$relations

array\Traversable

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if $relations is not an array or Traversable object

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets ACL resource associated with this page

setResource(string | \Zend\Permissions\Acl\Resource\ResourceInterface $resource) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setResource()

Parameters

$resource

string\Zend\Permissions\Acl\Resource\ResourceInterface

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if $resource is invalid

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets the page's reverse links to other pages

setRev(array | \Traversable $relations) : \Zend\Navigation\Page\AbstractPage
Inherited

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.

inherited_from \Zend\Navigation\Page\AbstractPage::setRev()

Parameters

$relations

array\Traversable

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if $relations it not an array or Traversable object

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets route name to use when assembling URL

setRoute(string $route) : \Zend\Navigation\Page\Mvc

see \Zend\Navigation\Page\getHref()

Parameters

$route

string

route name to use when assembling URL

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if invalid $route is given

Returns

\Zend\Navigation\Page\Mvcfluent interface, returns self

Set route match object from which parameters will be retrieved

setRouteMatch(\Zend\Mvc\Router\RouteMatch $matches) : \Zend\Navigation\Page\Mvc

Parameters

Returns

\Zend\Navigation\Page\Mvcfluent interface, returns self

Sets router for assembling URLs

setRouter(\Zend\Mvc\Router\RouteStackInterface $router) : \Zend\Navigation\Page\Mvc

see \Zend\Navigation\Page\getHref()

Parameters

Returns

\Zend\Navigation\Page\Mvcfluent interface, returns self

Sets page target

setTarget(string | null $target) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setTarget()

Parameters

$target

stringnull

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if target is not string or null

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets page title

setTitle(string $title) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setTitle()

Parameters

$title

string

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

Exceptions

\Zend\Navigation\Exception\InvalidArgumentException if not given string or null

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Sets whether the page should be visible or not

setVisible(bool $visible) : \Zend\Navigation\Page\AbstractPage
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::setVisible()

Parameters

$visible

bool

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

Returns

\Zend\Navigation\Page\AbstractPagefluent interface, returns self

Returns an array representation of the page

toArray() : array

Returns

arrayassociative array containing all page properties

Checks if container index is valid

valid() : bool
Inherited

Implements RecursiveIterator interface.

inherited_from \Zend\Navigation\AbstractContainer::valid()
inherited_from \Zend\Navigation\Page\AbstractPage::valid()

Returns

bool

Initializes page (used by subclasses)

init() : void
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::init()

Normalizes a property name

normalizePropertyName(string $property) : string
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::normalizePropertyName()

Parameters

$property

string

property name to normalize

Returns

stringnormalized property name

Sorts the page index according to page order

sort() : void
Inherited

inherited_from \Zend\Navigation\AbstractContainer::sort()
inherited_from \Zend\Navigation\Page\AbstractPage::sort()

 Properties

 

Action name to use when assembling URL

$action : string

 

Whether this page should be considered active

$active : bool
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$active
 

Style class for this page (CSS)

$class : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$class
 

Controller name to use when assembling URL

$controller : string

 

Default router to be used if router is not given.

$defaultRouter : \Zend\Mvc\Router\RouteStackInterface

see \Zend\Navigation\Page\getHref()
 

Whether index is dirty and needs to be re-arranged

$dirtyIndex : bool
Inherited

inherited_from \Zend\Navigation\AbstractContainer::$$dirtyIndex
inherited_from \Zend\Navigation\Page\AbstractPage::$$dirtyIndex
 

Fragment identifier (anchor identifier)

$fragment : string | null
Inherited

The fragment identifier (anchor identifier) pointing to an anchor within a resource that is subordinate to another, primary resource. The fragment identifier introduced by a hash mark "#". Example: http://www.example.org/foo.html#bar ("bar" is the fragment identifier)

link http://www.w3.org/TR/html401/intro/intro.html#fragment-uri
inherited_from \Zend\Navigation\Page\AbstractPage::$$fragment
 

Cached href

$hrefCache : string

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.

 

Page id

$id : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$id
 

An index that contains the order in which to iterate pages

$index : array
Inherited

inherited_from \Zend\Navigation\AbstractContainer::$$index
inherited_from \Zend\Navigation\Page\AbstractPage::$$index
 

Page label

$label : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$label
 

Page order used by parent container

$order : int | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$order
 

Contains sub pages

$pages : array
Inherited

inherited_from \Zend\Navigation\AbstractContainer::$$pages
inherited_from \Zend\Navigation\Page\AbstractPage::$$pages
 

Params to use when assembling URL

$params : array

see \Zend\Navigation\Page\getHref()
 

Parent container

$parent : \Zend\Navigation\AbstractContainer | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$parent
 

ACL privilege associated with this page

$privilege : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$privilege
 

Custom page properties, used by __set(), __get() and __isset()

$properties : array
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$properties
 

Forward links to other pages

$rel : array
Inherited

link http://www.w3.org/TR/html4/struct/links.html#h-12.3.1
inherited_from \Zend\Navigation\Page\AbstractPage::$$rel
 

ACL resource associated with this page

$resource : string | \Zend\Permissions\Acl\Resource\ResourceInterface | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$resource
 

Reverse links to other pages

$rev : array
Inherited

link http://www.w3.org/TR/html4/struct/links.html#h-12.3.1
inherited_from \Zend\Navigation\Page\AbstractPage::$$rev
 

RouteInterface name to use when assembling URL

$route : string

see \Zend\Navigation\Page\getHref()
 

RouteInterface matches; used for routing parameters and testing validity

$routeMatch : \Zend\Mvc\Router\RouteMatch

 

Router for assembling URLs

$router : \Zend\Mvc\Router\RouteStackInterface

see \Zend\Navigation\Page\getHref()
 

This page's target

$target : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$target
 

A more descriptive title for this page

$title : string | null
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$title
 

Whether this page should be considered visible

$visible : bool
Inherited

inherited_from \Zend\Navigation\Page\AbstractPage::$$visible