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.
Base class for Zend_Navigation_Page pages
bool $_active = 'false'
Whether this page should be considered active
string|null $_class = ''
Style class for this page (CSS)
string|null $_id = ''
Page id
string|null $_label = ''
Page label
int|null $_order = ''
Page order used by parent container
Zend_Navigation_Container|null $_parent = ''
Parent container
string|null $_privilege = ''
ACL privilege associated with this page
array $_properties = 'array'
Custom page properties, used by __set(), __get() and __isset()
array $_rel = 'array'
Forward links to other pages
string|Zend_Acl_Resource_Interface|null $_resource = ''
ACL resource associated with this page
array $_rev = 'array'
Reverse links to other pages
string|null $_target = ''
This page's target
string|null $_title = ''
A more descriptive title for this page
bool $_visible = 'true'
Whether this page should be considered visible
__construct(
array|Zend_Config $options
=
null
)
:
Page constructor
__get(
string $name
)
:
mixed
Returns a property, or null if it doesn't exist
Magic overload for enabling $page->propname
.
__isset(
string $name
)
:
bool
Checks if a property is set
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).
__set(
string $name, mixed $value
)
:
void
Sets a custom property
Magic overload for enabling $page->propname = $value
.
__toString(
)
:
string
Returns page label
Magic overload for enabling echo $page
.
__unset(
string $name
)
:
void
Unsets the given custom property
Magic overload for enabling unset($page->propname)
.
_init(
)
:
void
Initializes page (used by subclasses)
_normalizePropertyName(
string $property
)
:
string
Normalizes a property name
addRel(
string $relation, mixed $value
)
:
Zend_Navigation_Page
Adds a forward relation to the page
addRev(
string $relation, mixed $value
)
:
Zend_Navigation_Page
Adds a reverse relation to the page
factory(
array|Zend_Config $options
)
:
Zend_Navigation_Page
Factory for Zend_Navigation_Page classes
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.
get(
string $property
)
:
mixed
Returns the value of the given property
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.
getActive(
bool $recursive
=
false
)
:
bool
Proxy to isActive()
getClass(
)
:
string|null
Returns page class (CSS)
getCustomProperties(
)
:
array
Returns custom properties as an array
getDefinedRel(
)
:
array
Returns an array containing the defined forward relations
getDefinedRev(
)
:
array
Returns an array containing the defined reverse relations
getHref(
)
:
string
Returns href for this page
getId(
)
:
string|null
Returns page id
getLabel(
)
:
string
Returns page label
getOrder(
)
:
int|null
Returns page order used in parent container
getParent(
)
:
Zend_Navigation_Container|null
Returns parent container
getPrivilege(
)
:
string|null
Returns ACL privilege associated with this page
getRel(
string $relation
=
null
)
:
array
Returns the page's forward links to other pages
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.
getResource(
)
:
string|Zend_Acl_Resource_Interface|null
Returns ACL resource assoicated with this page
getRev(
string $relation
=
null
)
:
array
Returns the page's reverse links to other pages
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.
getTarget(
)
:
string|null
Returns page target
getTitle(
)
:
string|null
Returns page title
getVisible(
bool $recursive
=
false
)
:
bool
Proxy to isVisible()
Returns a boolean value indicating whether the page is visible
hashCode(
)
:
string
Returns a hash code value for the page
isActive(
bool $recursive
=
false
)
:
bool
Returns whether page should be considered active or not
isVisible(
bool $recursive
=
false
)
:
bool
Returns a boolean value indicating whether the page is visible
removeRel(
string $relation
)
:
Zend_Navigation_Page
Removes a forward relation from the page
removeRev(
string $relation
)
:
Zend_Navigation_Page
Removes a reverse relation from the page
set(
string $property, mixed $value
)
:
Zend_Navigation_Page
Sets the given property
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.
setActive(
bool $active
=
true
)
:
Zend_Navigation_Page
Sets whether page should be considered active or not
setClass(
string|null $class
=
null
)
:
Zend_Navigation_Page
Sets page CSS class
setConfig(
Zend_Config $config
)
:
Zend_Navigation_Page
Sets page properties using a Zend_Config object
setId(
string|null $id
=
null
)
:
Zend_Navigation_Page
Sets page id
setLabel(
string $label
)
:
Zend_Navigation_Page
Sets page label
setOptions(
array $options
)
:
Zend_Navigation_Page
Sets page properties using options from an associative array
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().
setOrder(
int $order
=
null
)
:
Zend_Navigation_Page
Sets page order to use in parent container
setParent(
Zend_Navigation_Container $parent
=
null
)
:
Zend_Navigation_Page
Sets parent container
setPrivilege(
string|null $privilege
=
null
)
:
Zend_Navigation_Page
Sets ACL privilege associated with this page
setRel(
array|Zend_Config $relations
=
null
)
:
Zend_Navigation_Page
Sets the page's forward links to other pages
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.
setResource(
string|Zend_Acl_Resource_Interface $resource
=
null
)
:
Zend_Navigation_Page
Sets ACL resource assoicated with this page
setRev(
array|Zend_Config $relations
=
null
)
:
Zend_Navigation_Page
Sets the page's reverse links to other pages
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.
setTarget(
string|null $target
=
null
)
:
Zend_Navigation_Page
Sets page target
setTitle(
string $title
=
null
)
:
Zend_Navigation_Page
Sets page title
setVisible(
bool $visible
=
true
)
:
Zend_Navigation_Page
Sets whether the page should be visible or not
toArray(
)
:
array
Returns an array representation of the page