Public Member Functions |
| menu (Zend_Navigation_Container $container=null) |
| setUlClass ($ulClass) |
| getUlClass () |
| setOnlyActiveBranch ($flag=true) |
| getOnlyActiveBranch () |
| setRenderParents ($flag=true) |
| getRenderParents () |
| setPartial ($partial) |
| getPartial () |
| htmlify (Zend_Navigation_Page $page) |
| renderMenu (Zend_Navigation_Container $container=null, array $options=array()) |
| renderSubMenu (Zend_Navigation_Container $container=null, $ulClass=null, $indent=null) |
| renderPartial (Zend_Navigation_Container $container=null, $partial=null) |
| render (Zend_Navigation_Container $container=null) |
Protected Member Functions |
| _normalizeOptions (array $options=array()) |
| _renderDeepestMenu (Zend_Navigation_Container $container, $ulClass, $indent, $minDepth, $maxDepth) |
| _renderMenu (Zend_Navigation_Container $container, $ulClass, $indent, $minDepth, $maxDepth, $onlyActive) |
Protected Attributes |
| $_ulClass = 'navigation' |
| $_onlyActiveBranch = false |
| $_renderParents = true |
| $_partial = null |
Detailed Description
Definition at line 37 of file Menu.php.
Member Function Documentation
_normalizeOptions |
( |
array $ |
options = array() ) |
[protected] |
Normalizes given render options
- Parameters:
-
array | $options | [optional] options to normalize |
- Returns:
- array normalized options
Definition at line 252 of file Menu.php.
_renderDeepestMenu |
( |
Zend_Navigation_Container $ |
container, |
|
|
$ |
ulClass, |
|
|
$ |
indent, |
|
|
$ |
minDepth, |
|
|
$ |
maxDepth |
|
) |
| [protected] |
Renders the deepest active menu within [$minDepth, $maxDeth], (called from renderMenu())
- Parameters:
-
Zend_Navigation_Container | $container | container to render |
array | $active | active page and depth |
string | $ulClass | CSS class for first UL |
string | $indent | initial indentation |
int | null | $minDepth | minimum depth |
int | null | $maxDepth | maximum depth |
- Returns:
- string rendered menu
Definition at line 311 of file Menu.php.
_renderMenu |
( |
Zend_Navigation_Container $ |
container, |
|
|
$ |
ulClass, |
|
|
$ |
indent, |
|
|
$ |
minDepth, |
|
|
$ |
maxDepth, |
|
|
$ |
onlyActive |
|
) |
| [protected] |
Renders a normal menu (called from renderMenu())
- Parameters:
-
Zend_Navigation_Container | $container | container to render |
string | $ulClass | CSS class for first UL |
string | $indent | initial indentation |
int | null | $minDepth | minimum depth |
int | null | $maxDepth | maximum depth |
bool | $onlyActive | render only active branch? |
- Returns:
- string
Definition at line 363 of file Menu.php.
Returns a flag indicating whether only active branch should be rendered
By default, this value is false, meaning the entire menu will be be rendered.
- Returns:
- bool whether only active branch should be rendered
Definition at line 134 of file Menu.php.
Returns partial view script to use for rendering menu
- Returns:
- string|array|null
Definition at line 193 of file Menu.php.
Returns flag indicating whether parents should be rendered when rendering only the active branch
By default, this value is true.
- Returns:
- bool whether parents should be rendered
Definition at line 163 of file Menu.php.
Returns CSS class to use for the first 'ul' element when rendering
- Returns:
- string CSS class
Definition at line 108 of file Menu.php.
htmlify |
( |
Zend_Navigation_Page $ |
page ) |
|
menu |
( |
Zend_Navigation_Container $ |
container = null ) |
|
View helper entry point: Retrieves helper and optionally sets container to operate on
- Parameters:
-
Zend_Navigation_Container | $container | [optional] container to operate on |
- Returns:
- Zend_View_Helper_Navigation_Menu fluent interface, returns self
Definition at line 77 of file Menu.php.
render |
( |
Zend_Navigation_Container $ |
container = null ) |
|
renderMenu |
( |
Zend_Navigation_Container $ |
container = null , |
|
|
array $ |
options = array() |
|
) |
| |
Renders helper
Renders a HTML 'ul' for the given $container. If $container is not given, the container registered in the helper will be used.
Available $options:
- Parameters:
-
Zend_Navigation_Container | $container | [optional] container to create menu from. Default is to use the container retrieved from getContainer(). |
array | $options | [optional] options for controlling rendering |
- Returns:
- string rendered menu
Definition at line 484 of file Menu.php.
renderPartial |
( |
Zend_Navigation_Container $ |
container = null , |
|
|
$ |
partial = null |
|
) |
| |
Renders the given $container by invoking the partial view helper
The container will simply be passed on as a model to the view script as-is, and will be available in the partial script as 'container', e.g. echo 'Number of pages: ', count($this->container);
.
- Parameters:
-
Zend_Navigation_Container | $container | [optional] container to pass to view script. Default is to use the container registered in the helper. |
string | array | $partial | [optional] partial view script to use. Default is to use the partial registered in the helper. If an array is given, it is expected to contain two values; the partial view script to use, and the module where the script can be found. |
- Returns:
- string helper output
Definition at line 577 of file Menu.php.
renderSubMenu |
( |
Zend_Navigation_Container $ |
container = null , |
|
|
$ |
ulClass = null , |
|
|
$ |
indent = null |
|
) |
| |
Renders the inner-most sub menu for the active page in the $container
This is a convenience method which is equivalent to the following call: renderMenu($container, array( 'indent' => $indent, 'ulClass' => $ulClass, 'minDepth' => null, 'maxDepth' => null, 'onlyActiveBranch' => true, 'renderParents' => false ));
- Parameters:
-
Zend_Navigation_Container | $container | [optional] container to render. Default is to render the container registered in the helper. |
string | $ulClass | [optional] CSS class to use for UL element. Default is to use the value from getUlClass(). |
string | int | $indent | [optional] indentation as a string or number of spaces. Default is to use the value retrieved from getIndent(). |
- Returns:
- string rendered content
Definition at line 541 of file Menu.php.
setOnlyActiveBranch |
( |
$ |
flag = true ) |
|
Sets a flag indicating whether only active branch should be rendered
- Parameters:
-
bool | $flag | [optional] render only active branch. Default is true. |
- Returns:
- Zend_View_Helper_Navigation_Menu fluent interface, returns self
Definition at line 120 of file Menu.php.
Sets which partial view script to use for rendering menu
- Parameters:
-
string | array | $partial | partial view script or null. If an array is given, it is expected to contain two values; the partial view script to use, and the module where the script can be found. |
- Returns:
- Zend_View_Helper_Navigation_Menu fluent interface, returns self
Definition at line 179 of file Menu.php.
setRenderParents |
( |
$ |
flag = true ) |
|
Enables/disables rendering of parents when only rendering active branch
See setOnlyActiveBranch() for more information.
- Parameters:
-
bool | $flag | [optional] render parents when rendering active branch. Default is true. |
- Returns:
- Zend_View_Helper_Navigation_Menu fluent interface, returns self
Definition at line 149 of file Menu.php.
Sets CSS class to use for the first 'ul' element when rendering
- Parameters:
-
string | $ulClass | CSS class to set |
- Returns:
- Zend_View_Helper_Navigation_Menu fluent interface, returns self
Definition at line 94 of file Menu.php.
The documentation for this class was generated from the following file:
- E:/E/GEAMP/www/openbiz/openbiz/others/Zend/View/Helper/Navigation/Menu.php