__call()
__invoke()
__toString()
accept()
escapeLabels()
findActive()
getAcl()
getClosingBracket()
getContainer()
getIndent()
getMaxDepth()
getMinDepth()
getOnlyActiveBranch()
getPartial()
getRenderInvisible()
getRenderParents()
getRole()
getServiceLocator()
getTranslator()
getTranslatorTextDomain()
getUlClass()
getUseAcl()
getView()
hasAcl()
hasContainer()
hasRole()
hasTranslator()
htmlify()
isTranslatorEnabled()
render()
renderMenu()
renderPartial()
renderSubMenu()
setAcl()
setContainer()
setDefaultAcl()
setDefaultRole()
setIndent()
setMaxDepth()
setMinDepth()
setOnlyActiveBranch()
setPartial()
setRenderInvisible()
setRenderParents()
setRole()
setServiceLocator()
setTranslator()
setTranslatorEnabled()
setTranslatorTextDomain()
setUlClass()
setUseAcl()
setView()
acceptAcl()
getWhitespace()
htmlAttribs()
isXhtml()
normalizeId()
normalizeOptions()
parseContainer()
renderDeepestMenu()
renderNormalMenu()
$acl
$closingBracket
$container
$defaultAcl
$defaultRole
$escapeLabels
$indent
$maxDepth
$minDepth
$onlyActiveBranch
$partial
$renderInvisible
$renderParents
$role
$serviceLocator
$translator
$translatorEnabled
$translatorTextDomain
$ulClass
$useAcl
$view
EOL
Helper for rendering menus from navigation containers
__call(string $method, array $arguments) : mixed
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::__call() |
|---|
stringmethod name in container
array[optional] arguments to pass
\Zend\Navigation\Exception\ExceptionInterface |
if method does not exist in container |
|---|
mixedreturns what the container returns__invoke(\Zend\Navigation\AbstractContainer $container) : \Zend\View\Helper\Navigation\Menu
__toString() : string
This method will trigger an E_USER_ERROR if rendering the helper causes an exception to be thrown.
Implements HelperInterface::__toString().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::__toString() |
|---|
stringaccept(\Zend\Navigation\Page\AbstractPage $page, bool $recursive) : bool
Rules: - If a page is not visible it is not accepted, unless RenderInvisible has been set to true. - If helper has no ACL, page is accepted - If helper has ACL, but no role, page is not accepted - If helper has ACL and role: - Page is accepted if it has no resource or privilege - Page is accepted if ACL allows page's resource or privilege - If page is accepted by the rules above and $recursive is true, the page will not be accepted if it is the descendant of a non-accepted page.
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::accept() |
|---|
bool[optional] if true, page will not be accepted if it is the descendant of a page that is not accepted. Default is true.
boolwhether page should be acceptedescapeLabels(bool $flag) : \Zend\View\Helper\Navigation\Menu
bool[optional] escape labels. Default is true.
\Zend\View\Helper\Navigation\Menufluent interface, returns selffindActive(\Zend\Navigation\AbstractContainer $container, int | null $minDepth, int | null $maxDepth) : array
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::findActive() |
|---|
intnull[optional] minimum depth required for page to be valid. Default is to use {@link getMinDepth()}. A null value means no minimum depth required.
intnull[optional] maximum depth a page can have to be valid. Default is to use {@link getMaxDepth()}. A null value means no maximum depth required.
arrayan associative array with the values 'depth' and 'page', or an empty array if not foundgetAcl() : \Zend\Permissions\Acl\AclInterface | null
Implements HelperInterface::getAcl().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getAcl() |
|---|
\Zend\Permissions\Acl\AclInterfacenullACL object or nullgetClosingBracket() : string
| inherited_from | \Zend\View\Helper\AbstractHtmlElement::getClosingBracket() |
|---|---|
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getClosingBracket() |
stringgetContainer() : \Zend\Navigation\AbstractContainer
Implements HelperInterface::getContainer().
If no container is set, a new container will be instantiated and stored in the helper.
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getContainer() |
|---|
\Zend\Navigation\AbstractContainernavigation containergetIndent() : string
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getIndent() |
|---|
stringgetMaxDepth() : int | null
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getMaxDepth() |
|---|
intnullmaximum depth or nullgetMinDepth() : int | null
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getMinDepth() |
|---|
intnullminimum depth or nullgetOnlyActiveBranch() : bool
By default, this value is false, meaning the entire menu will be be rendered.
boolwhether only active branch should be renderedgetPartial() : string | array | null
stringarraynull
getRenderInvisible() : bool
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getRenderInvisible() |
|---|
boolgetRenderParents() : bool
By default, this value is true.
boolwhether parents should be renderedgetRole() : string | \Zend\Permissions\Acl\Role\RoleInterface | null
Implements HelperInterface::getRole().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getRole() |
|---|
getServiceLocator() : \Zend\ServiceManager\ServiceLocatorInterface
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getServiceLocator() |
|---|
getTranslator() : \Zend\I18n\Translator\Translator | null
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getTranslator() |
|---|
getTranslatorTextDomain() : string
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getTranslatorTextDomain() |
|---|
stringgetUlClass() : string
stringCSS classgetUseAcl() : bool
Implements HelperInterface::getUseAcl().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getUseAcl() |
|---|
boolwhether ACL should be usedgetView() : null | \Zend\View\Renderer\RendererInterface
| inherited_from | \Zend\View\Helper\AbstractHelper::getView() |
|---|---|
| inherited_from | \Zend\View\Helper\AbstractHtmlElement::getView() |
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getView() |
hasAcl() : bool
Implements HelperInterface::hasAcl().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasAcl() |
|---|
boolwhether the helper has a an ACL instance or nothasContainer() : bool
Implements HelperInterface::hasContainer().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasContainer() |
|---|
boolwhether the helper has a container or nothasRole() : bool
Implements HelperInterface::hasRole().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasRole() |
|---|
boolwhether the helper has a an ACL role or nothasTranslator() : bool
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasTranslator() |
|---|
boolhtmlify(\Zend\Navigation\Page\AbstractPage $page, bool $escapeLabel) : string
Overrides AbstractHelper::htmlify().
boolWhether or not to escape the label
stringHTML string for the given pageisTranslatorEnabled() : bool
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::isTranslatorEnabled() |
|---|
boolrender(\Zend\Navigation\AbstractContainer $container) : string
Implements 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.
| see | \Zend\View\Helper\Navigation\renderPartial() |
|---|---|
| see | \Zend\View\Helper\Navigation\renderMenu() |
\Zend\Navigation\AbstractContainer[optional] container to render. Default is to render the container registered in the helper.
\Zend\View\Exception\ExceptionInterface |
if unable to render |
|---|
stringhelper outputrenderMenu(\Zend\Navigation\AbstractContainer $container, array $options) : string
Renders a HTML 'ul' for the given $container. If $container is not given, the container registered in the helper will be used.
Available $options:
\Zend\Navigation\AbstractContainer[optional] container to create menu from. Default is to use the container retrieved from {@link getContainer()}.
array[optional] options for controlling rendering
stringrendered menurenderPartial(\Zend\Navigation\AbstractContainer $container, string | array $partial) : string
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);
.
\Zend\Navigation\AbstractContainer[optional] container to pass to view script. Default is to use the container registered in the helper.
stringarray[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.
\Zend\View\Exception\RuntimeException |
if no partial provided |
|---|---|
\Zend\View\Exception\InvalidArgumentException |
if partial is invalid array |
stringhelper outputrenderSubMenu(\Zend\Navigation\AbstractContainer $container, string $ulClass, string | int $indent) : string
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
));
\Zend\Navigation\AbstractContainer[optional] container to render. Default is to render the container registered in the helper.
string[optional] CSS class to use for UL element. Default is to use the value from {@link getUlClass()}.
stringint[optional] indentation as a string or number of spaces. Default is to use the value retrieved from {@link getIndent()}.
stringrendered contentsetAcl(\Zend\Permissions\Acl\AclInterface $acl) : \Zend\View\Helper\Navigation\AbstractHelper
Implements HelperInterface::setAcl().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setAcl() |
|---|
\Zend\View\Helper\Navigation\AbstractHelperfluent interface, returns selfsetContainer(string | \Zend\Navigation\AbstractContainer $container) : \Zend\View\Helper\Navigation\AbstractHelper
Implements HelperInterface::setContainer().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setContainer() |
|---|
string\Zend\Navigation\AbstractContainer[optional] container to operate on. Default is null, meaning container will be reset.
\Zend\View\Helper\Navigation\AbstractHelperfluent interface, returns selfsetDefaultAcl(\Zend\Permissions\Acl\AclInterface $acl) : void
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setDefaultAcl() |
|---|
\Zend\Permissions\Acl\AclInterface[optional] ACL object. Default is null, which sets no ACL object.
setDefaultRole(mixed $role) : void
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setDefaultRole() |
|---|
mixed[optional] role to set. Expects null, string, or an instance of {@link Acl\Role\RoleInterface}. Default is null, which sets no default role.
\Zend\View\Exception\InvalidArgumentException |
if role is invalid |
|---|
setIndent(string | int $indent) : \Zend\View\Helper\Navigation\AbstractHelper
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setIndent() |
|---|
stringintindentation string or number of spaces
\Zend\View\Helper\Navigation\AbstractHelperfluent interface, returns selfsetMaxDepth(int $maxDepth) : \Zend\View\Helper\Navigation\AbstractHelper
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setMaxDepth() |
|---|
int[optional] maximum depth. Default is null, which sets no maximum depth.
\Zend\View\Helper\Navigation\AbstractHelperfluent interface, returns selfsetMinDepth(int $minDepth) : \Zend\View\Helper\Navigation\AbstractHelper
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setMinDepth() |
|---|
int[optional] minimum depth. Default is null, which sets no minimum depth.
\Zend\View\Helper\Navigation\AbstractHelperfluent interface, returns selfsetOnlyActiveBranch(bool $flag) : \Zend\View\Helper\Navigation\Menu
bool[optional] render only active branch. Default is true.
\Zend\View\Helper\Navigation\Menufluent interface, returns selfsetPartial(string | array $partial) : \Zend\View\Helper\Navigation\Menu
stringarraypartial 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.
\Zend\View\Helper\Navigation\Menufluent interface, returns selfsetRenderInvisible(bool $renderInvisible) : \Zend\View\Helper\Navigation\AbstractHelper
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setRenderInvisible() |
|---|
bool[optional] boolean flag
\Zend\View\Helper\Navigation\AbstractHelperfluent interface returns selfsetRenderParents(bool $flag) : \Zend\View\Helper\Navigation\Menu
See setOnlyActiveBranch() for more information.
bool[optional] render parents when rendering active branch. Default is true.
\Zend\View\Helper\Navigation\Menufluent interface, returns selfsetRole(mixed $role) : \Zend\View\Helper\Navigation\AbstractHelper
Implements HelperInterface::setRole().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setRole() |
|---|
mixed[optional] role to set. Expects a string, an instance of type {@link Acl\Role\RoleInterface}, or null. Default is null, which will set no role.
\Zend\View\Exception\InvalidArgumentException |
if $role is invalid |
|---|
\Zend\View\Helper\Navigation\AbstractHelperfluent interface, returns selfsetServiceLocator(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator) : \Zend\View\Helper\Navigation\AbstractHelper
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setServiceLocator() |
|---|
\Zend\ServiceManager\ServiceLocatorInterface
setTranslator(\Zend\I18n\Translator\Translator $translator, string $textDomain) : \Zend\View\Helper\Navigation\AbstractHelper
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setTranslator() |
|---|
\Zend\I18n\Translator\Translator[optional] translator. Default is null, which sets no translator.
string[optional] text domain Default is null, which skips setTranslatorTextDomain
setTranslatorEnabled(bool $enabled) : \Zend\View\Helper\Navigation\AbstractHelper
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setTranslatorEnabled() |
|---|
bool[optional] whether translator should be used. Default is true.
setTranslatorTextDomain(string $textDomain) : \Zend\View\Helper\Navigation\AbstractHelper
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setTranslatorTextDomain() |
|---|
string
setUlClass(string $ulClass) : \Zend\View\Helper\Navigation\Menu
stringCSS class to set
\Zend\View\Helper\Navigation\Menufluent interface, returns selfsetUseAcl(bool $useAcl) : \Zend\View\Helper\Navigation\AbstractHelper
Implements HelperInterface::setUseAcl().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setUseAcl() |
|---|
bool[optional] whether ACL should be used. Default is true.
\Zend\View\Helper\Navigation\AbstractHelperfluent interface, returns selfsetView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
| inherited_from | \Zend\View\Helper\AbstractHelper::setView() |
|---|---|
| inherited_from | \Zend\View\Helper\AbstractHtmlElement::setView() |
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setView() |
acceptAcl(\Zend\Navigation\Page\AbstractPage $page) : bool
Rules: - If helper has no ACL, page is accepted - If page has a resource or privilege defined, page is accepted if the ACL allows access to it using the helper's role - If page has no resource or privilege, page is accepted
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::acceptAcl() |
|---|
boolwhether page is accepted by ACLgetWhitespace(int | string $indent) : string
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getWhitespace() |
|---|
intstring
stringhtmlAttribs(array $attribs) : string
Overloads View\Helper\AbstractHtmlElement::htmlAttribs().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::htmlAttribs() |
|---|
arrayan array where each key-value pair is converted to an attribute name and value
stringan attribute stringisXhtml() : bool
| inherited_from | \Zend\View\Helper\AbstractHtmlElement::isXhtml() |
|---|---|
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::isXhtml() |
boolnormalizeId(string $value) : string
Overrides View\Helper\AbstractHtmlElement::normalizeId().
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::normalizeId() |
|---|
string
stringnormalizeOptions(array $options) : array
array[optional] options to normalize
arraynormalized optionsparseContainer(\Zend\Navigation\AbstractContainer | string | null $container)
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::parseContainer() |
|---|
\Zend\Navigation\AbstractContainerstringnull
\Zend\View\Exception\InvalidArgumentException |
|---|
renderDeepestMenu(\Zend\Navigation\AbstractContainer $container, string $ulClass, string $indent, int | null $minDepth, int | null $maxDepth, bool $escapeLabels) : string
stringCSS class for first UL
stringinitial indentation
intnullminimum depth
intnullmaximum depth
boolWhether or not to escape the labels
stringrendered menurenderNormalMenu(\Zend\Navigation\AbstractContainer $container, string $ulClass, string $indent, int | null $minDepth, int | null $maxDepth, bool $onlyActive, bool $escapeLabels) : string
stringCSS class for first UL
stringinitial indentation
intnullminimum depth
intnullmaximum depth
boolrender only active branch?
boolWhether or not to escape the labels
string$acl : \Zend\Permissions\Acl\AclInterface
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$acl |
|---|
$closingBracket : string
| inherited_from | \Zend\View\Helper\AbstractHtmlElement::$$closingBracket |
|---|---|
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$closingBracket |
$container : \Zend\Navigation\AbstractContainer
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$container |
|---|
$defaultAcl : \Zend\Permissions\Acl\AclInterface
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$defaultAcl |
|---|
$defaultRole : string | \Zend\Permissions\Acl\Role\RoleInterface
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$defaultRole |
|---|
$escapeLabels : bool
$indent : string
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$indent |
|---|
$maxDepth : int
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$maxDepth |
|---|
$minDepth : int
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$minDepth |
|---|
$onlyActiveBranch : bool
$partial : string | array
$renderInvisible : bool
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$renderInvisible |
|---|
$renderParents : bool
$role : string | \Zend\Permissions\Acl\Role\RoleInterface
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$role |
|---|
$serviceLocator : \Zend\ServiceManager\ServiceLocatorInterface
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$serviceLocator |
|---|
$translator : \Zend\I18n\Translator\Translator
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$translator |
|---|
$translatorEnabled : bool
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$translatorEnabled |
|---|
$translatorTextDomain : string
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$translatorTextDomain |
|---|
$ulClass : string
$useAcl : bool
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$useAcl |
|---|
$view : \Zend\View\Renderer\RendererInterface
| inherited_from | \Zend\View\Helper\AbstractHelper::$$view |
|---|---|
| inherited_from | \Zend\View\Helper\AbstractHtmlElement::$$view |
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$view |
EOL
| inherited_from | \Zend\View\Helper\AbstractHtmlElement::EOL |
|---|---|
| inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::EOL |