Base class for ZendNavigationPage pages
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’,
or ‘route’, a Zend_Navigation_Page_Mvc page will be created.
Parameters: | array|Traversable – options used for creating page |
---|---|
Return type: | AbstractPage a page instance |
Throws : | ExceptionInvalidArgumentException if $options is not array/Traversable |
Throws : | ExceptionInvalidArgumentException if ‘type’ is specified but class not found |
Throws : | ExceptionInvalidArgumentException if something goes wrong during instantiation of the page |
Throws : | ExceptionInvalidArgumentException if ‘type’ is given, and the specified type does not extend this class |
Throws : | ExceptionInvalidArgumentException if unable to determine which class to instantiate |
Page constructor
Parameters: | array|Traversable – [optional] page options. Default is null, which should set defaults. |
---|---|
Throws ExceptionInvalidArgumentException: | |
if invalid options are given |
Initializes page (used by subclasses)
Return type: | void |
---|
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().
Parameters: | array – associative array of options to set |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if invalid options are given |
Sets page label
Parameters: | string – new page label |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if empty/no string is given |
Sets a fragment identifier
Parameters: | string – new fragment identifier |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if empty/no string is given |
Returns fragment identifier
Return type: | string|null fragment identifier |
---|
Sets page id
Parameters: | string|null – [optional] id to set. Default is null, which sets no id. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if not given string or null |
Sets page CSS class
Parameters: | string|null – [optional] CSS class to set. Default is null, which sets no CSS class. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if not given string or null |
Returns page class (CSS)
Return type: | string|null page’s CSS class or null |
---|
Sets page title
Parameters: | string – [optional] page title. Default is null, which sets no title. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if not given string or null |
Sets page target
Parameters: | string|null – [optional] target to set. Default is null, which sets no target. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if target is not string or null |
Returns page target
Return type: | string|null page target or null |
---|
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.
Parameters: | array|Traversable – [optional] an associative array of forward links to other pages |
---|---|
Throws ExceptionInvalidArgumentException: | |
if $relations is not an array or Traversable object | |
Return type: | AbstractPage fluent interface, returns self |
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.
Parameters: | string – [optional] name of relation to return. If not given, all relations will be returned. |
---|---|
Return type: | array an array of relations. If $relation is not specified, all relations will be returned in an associative array. |
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.
Parameters: | array|Traversable – [optional] an associative array of reverse links to other pages |
---|---|
Throws ExceptionInvalidArgumentException: | |
if $relations it not an array or Traversable object | |
Return type: | AbstractPage fluent interface, returns self |
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.
Parameters: | string – [optional] name of relation to return. If not given, all relations will be returned. |
---|---|
Return type: | array an array of relations. If $relation is not specified, all relations will be returned in an associative array. |
Sets page order to use in parent container
Parameters: | int – [optional] page order in container. Default is null, which sets no specific order. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if order is not integer or null |
Returns page order used in parent container
Return type: | int|null page order or null |
---|
Sets ACL resource associated with this page
Parameters: | string|AclResource – [optional] resource to associate with page. Default is null, which sets no resource. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if $resource is invalid |
Returns ACL resource associated with this page
Return type: | string|AclResource|null ACL resource or null |
---|
Sets ACL privilege associated with this page
Parameters: | string|null – [optional] ACL privilege to associate with this page. Default is null, which sets no privilege. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Returns ACL privilege associated with this page
Return type: | string|null ACL privilege or null |
---|
Sets whether page should be considered active or not
Parameters: | bool – [optional] whether page should be considered active or not. Default is true. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Returns whether page should be considered active or not
Parameters: | bool – [optional] whether page should be considered active if any child pages are active. Default is false. |
---|---|
Return type: | bool whether page should be considered active |
Proxy to isActive()
Parameters: | bool – [optional] whether page should be considered active if any child pages are active. Default is false. |
---|---|
Return type: | bool whether page should be considered active |
Sets whether the page should be visible or not
Parameters: | bool – [optional] whether page should be considered visible or not. Default is true. |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Returns a boolean value indicating whether the page is visible
Parameters: | bool – [optional] whether page should be considered invisible if parent is invisible. Default is false. |
---|---|
Return type: | bool whether page should be considered visible |
Proxy to isVisible()
Returns a boolean value indicating whether the page is visible
Parameters: | bool – [optional] whether page should be considered invisible if parent is invisible. Default is false. |
---|---|
Return type: | bool whether page should be considered visible |
Sets parent container
Parameters: | AbstractContainer – [optional] new parent to set. Default is null which will set no parent. |
---|---|
Throws ExceptionInvalidArgumentException: | |
Return type: | AbstractPage fluent interface, returns self |
Returns parent container
Return type: | AbstractContainer|null parent container or null |
---|
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.
Parameters: |
|
---|---|
Return type: | AbstractPage fluent interface, returns self |
Throws : | ExceptionInvalidArgumentException if property name is invalid |
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.
Parameters: | string – property name |
---|---|
Return type: | mixed the property’s value or null |
Throws : | ExceptionInvalidArgumentException if property name is invalid |
Sets a custom property
Magic overload for enabling <code>$page->propname = $value</code>.
Parameters: |
|
---|---|
Return type: | void |
Throws : | ExceptionInvalidArgumentException if property name is invalid |
Returns a property, or null if it doesn’t exist
Magic overload for enabling <code>$page->propname</code>.
Parameters: | string – property name |
---|---|
Return type: | mixed property value or null |
Throws : | ExceptionInvalidArgumentException if property name is invalid |
Checks if a property is set
Magic overload for enabling <code>isset($page->propname)</code>.
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: | string – property name |
---|---|
Return type: | bool whether the given property exists |
Unsets the given custom property
Magic overload for enabling <code>unset($page->propname)</code>.
Parameters: | string – property name |
---|---|
Return type: | void |
Throws : | ExceptionInvalidArgumentException if the property is native |
Returns page label
Magic overload for enabling <code>echo $page</code>.
Return type: | string page label |
---|
Adds a forward relation to the page
Parameters: |
|
---|---|
Return type: | AbstractPage fluent interface, returns self |
Adds a reverse relation to the page
Parameters: |
|
---|---|
Return type: | AbstractPage fluent interface, returns self |
Removes a forward relation from the page
Parameters: | string – name of relation to remove |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Removes a reverse relation from the page
Parameters: | string – name of relation to remove |
---|---|
Return type: | AbstractPage fluent interface, returns self |
Returns an array containing the defined forward relations
Return type: | array defined forward relations |
---|
Returns an array containing the defined reverse relations
Return type: | array defined reverse relations |
---|
Returns custom properties as an array
Return type: | array an array containing custom properties |
---|
Returns a hash code value for the page
Return type: | string a hash code value for this page |
---|
Returns an array representation of the page
Return type: | array associative array containing all page properties |
---|
Full-text doc search.
Enter search terms or a module, class or function name.