Helper for rendering menus from navigation containers
View helper entry point: Retrieves helper and optionally sets container to operate on
Parameters: | AbstractContainer – [optional] container to operate on |
---|---|
Return type: | Menu fluent interface, returns self |
Sets CSS class to use for the first ‘ul’ element when rendering
Parameters: | string – CSS class to set |
---|---|
Return type: | Menu fluent interface, returns self |
Returns CSS class to use for the first ‘ul’ element when rendering
Return type: | string CSS class |
---|
Sets a flag indicating whether only active branch should be rendered
Parameters: | bool – [optional] render only active branch. Default is true. |
---|---|
Return type: | Menu fluent interface, returns self |
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.
Return type: | bool whether only active branch should be rendered |
---|
Sets a flag indicating whether labels should be escaped
Parameters: | bool – [optional] escape labels. Default is true. |
---|---|
Return type: | Menu fluent interface, returns self |
Returns flag indicating whether parents should be rendered when rendering only the active branch
By default, this value is true.
Return type: | bool whether parents should be rendered |
---|
Sets which partial view script to use for rendering menu
Parameters: | string|array – 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. |
---|---|
Return type: | Menu fluent interface, returns self |
Returns partial view script to use for rendering menu
Return type: | string|array|null |
---|
Returns an HTML string containing an ‘a’ element for the given page if the page’s href is not empty, and a ‘span’ element if it is empty
Overrides {@link AbstractHelper::htmlify()}.
Parameters: |
|
---|---|
Return type: | string HTML string for the given page |
Normalizes given render options
Parameters: | array – [optional] options to normalize |
---|---|
Return type: | array normalized options |
Renders the deepest active menu within [$minDepth, $maxDepth], (called from {@link renderMenu()})
Parameters: |
|
---|---|
Return type: | string rendered menu |
Renders a normal menu (called from {@link renderMenu()})
Parameters: |
|
---|---|
Return type: | string |
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: |
|
---|---|
Return type: | string rendered menu |
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: <code> renderMenu($container, array(
‘indent’ => $indent, ‘ulClass’ => $ulClass, ‘minDepth’ => null, ‘maxDepth’ => null, ‘onlyActiveBranch’ => true, ‘renderParents’ => false
)); </code>
Parameters: |
|
---|---|
Return type: | string rendered content |
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. <code>echo ‘Number of pages: ‘, count($this->container);</code>.
Parameters: |
|
---|---|
Return type: | string helper output |
Throws : | ExceptionRuntimeException if no partial provided |
Throws : | ExceptionInvalidArgumentException if partial is invalid array |
Renders menu
Implements {@link HelperInterface::render()}.
If a partial view is registered in the helper, the menu will be rendered using the given partial script. If no partial is registered, the menu will be rendered as an ‘ul’ element by the helper’s internal method.
Parameters: | AbstractContainer – [optional] container to render. Default is to render the container registered in the helper. |
---|---|
Return type: | string helper output |
Full-text doc search.
Enter search terms or a module, class or function name.