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-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Navigation
- Subpackage
- Page
- Version
- $Id$
\Zend_Navigation_Page_Mvc
Package: Zend_Navigation\PageRepresents 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.
- Parent(s)
- \Zend_Navigation_Page
<
\Zend_Navigation_Container
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



bool $_active = nullWhether this page should be considered active
Default valuenullDetails- Type
- bool



bool $_encodeUrl = trueWhether href should be encoded when assembling URL
Default valuetrueDetails- Type
- bool
- See
-



array $_params = array()Params to use when assembling URL
Default valuearray()Details- Type
- array
- See
-



bool $_resetParams = trueWhether params should be reset when assembling URL
Default valuetrueDetails- Type
- bool
- See
-
Methods



addParams(array $params) : \Zend_Navigation_Page_MvcAdd multiple parameters (to use when assembling URL) at once
URL options passed to the url action helper for assembling URLs.
Parameters| Name | Type | Description |
|---|
| $params | array | paramters as array ('name' => 'value') |
|---|
ReturnsDetails- See
-



getAction() : string | nullReturns action name to use when assembling URL
Returns| Type | Description |
|---|
| string | null | action name |
Details- See
-



getController() : string | nullReturns controller name to use when assembling URL
Returns| Type | Description |
|---|
| string | null | controller name or null |
Details- See
-



getEncodeUrl() : boolReturns whether herf should be encoded when assembling URL
Returns| Type | Description |
|---|
| bool | whether herf should be encoded when assembling URL |
Details- See
-



getHref() : stringReturns 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 |



getModule() : string | nullReturns module name to use when assembling URL
Returns| Type | Description |
|---|
| string | null | module name or null |
Details- See
-



getParam(string $name) : mixedRetrieve a single parameter (to use when assembling URL)
Parameters| Name | Type | Description |
|---|
| $name | string | parameter name |
|---|
ReturnsDetails- See
-



getParams() : arrayRetrieve all parameters (to use when assembling URL)
Returns| Type | Description |
|---|
| array | parameters as array ('name' => 'value') |
Details- See
-



getResetParams() : boolReturns whether params should be reset when assembling URL
Returns| Type | Description |
|---|
| bool | whether params should be reset when assembling URL |
Details- See
-



getRoute() : stringReturns route name to use when assembling URL
Returns| Type | Description |
|---|
| string | route name |
Details- See
-



getScheme() : string | nullReturns scheme to use when assembling URL
Returns| Type | Description |
|---|
| string | null | scheme or null |
Details- See
-



isActive(bool $recursive = false) : boolReturns 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 |



removeParam(string $name) : boolRemove parameter (to use when assembling URL)
Parameters| Name | Type | Description |
|---|
| $name | string | |
|---|
ReturnsDetails- See
-



setAction(string $action) : \Zend_Navigation_Page_MvcSets action name to use when assembling URL
Parameters| Name | Type | Description |
|---|
| $action | string | action name |
|---|
ReturnsThrowsDetails- See
-



setController(string | null $controller) : \Zend_Navigation_Page_MvcSets controller name to use when assembling URL
Parameters| Name | Type | Description |
|---|
| $controller | string | null | controller name |
|---|
ReturnsThrowsDetails- See
-



setEncodeUrl( $encodeUrl) : \Zend_Navigation_Page_MvcSets whether href should be encoded when assembling URL
Parameters| Name | Type | Description |
|---|
| $encodeUrl | | |
|---|
ReturnsDetails- See
-



setModule(string | null $module) : \Zend_Navigation_Page_MvcSets module name to use when assembling URL
Parameters| Name | Type | Description |
|---|
| $module | string | null | module name |
|---|
ReturnsThrowsDetails- See
-



setParam(string $name, mixed $value) : \Zend_Navigation_Page_MvcSet parameter (to use when assembling URL)
URL option passed to the url action helper for assembling URLs.
Parameters| Name | Type | Description |
|---|
| $name | string | parameter name |
|---|
| $value | mixed | parameter value |
|---|
ReturnsDetails- See
-



setParams(array | null $params = null) : \Zend_Navigation_Page_MvcSet multiple parameters (to use when assembling URL) at once
URL options passed to the url action helper for assembling URLs.
Overwrites any previously set parameters!
Parameters| Name | Type | Description |
|---|
| $params | array | null | [optional] paramters as array
('name' => 'value'). Default is null
which clears all params.
|
|---|
ReturnsDetails- See
-



setResetParams(bool $resetParams) : \Zend_Navigation_Page_MvcSets whether params should be reset when assembling URL
Parameters| Name | Type | Description |
|---|
| $resetParams | bool | whether params should be reset when
assembling URL |
|---|
ReturnsDetails- See
-



setRoute(string $route) : \Zend_Navigation_Page_MvcSets route name to use when assembling URL
Parameters| Name | Type | Description |
|---|
| $route | string | route name to use when assembling URL |
|---|
ReturnsThrowsDetails- See
-



setScheme(string | null $scheme) : \Zend_Navigation_Page_MvcSets scheme to use when assembling URL
Parameters| Name | Type | Description |
|---|
| $scheme | string | null | scheme |
|---|
ReturnsThrowsDetails- See
-



toArray() : arrayReturns an array representation of the page
Returns| Type | Description |
|---|
| array | associative array containing all page properties |