__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() |
---|
string
method name in container
array
[optional] arguments to pass
\Zend\Navigation\Exception\ExceptionInterface |
if method does not exist in container |
---|
mixed
returns 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() |
---|
string
accept(\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.
bool
whether page should be acceptedescapeLabels(bool $flag) : \Zend\View\Helper\Navigation\Menu
bool
[optional] escape labels. Default is true.
\Zend\View\Helper\Navigation\Menu
fluent 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.
array
an 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\AclInterface
null
ACL object or nullgetClosingBracket() : string
inherited_from | \Zend\View\Helper\AbstractHtmlElement::getClosingBracket() |
---|---|
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getClosingBracket() |
string
getContainer() : \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\AbstractContainer
navigation containergetIndent() : string
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getIndent() |
---|
string
getMaxDepth() : int | null
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getMaxDepth() |
---|
int
null
maximum depth or nullgetMinDepth() : int | null
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getMinDepth() |
---|
int
null
minimum depth or nullgetOnlyActiveBranch() : bool
By default, this value is false, meaning the entire menu will be be rendered.
bool
whether only active branch should be renderedgetPartial() : string | array | null
string
array
null
getRenderInvisible() : bool
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getRenderInvisible() |
---|
bool
getRenderParents() : bool
By default, this value is true.
bool
whether 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() |
---|
string
getUlClass() : string
string
CSS classgetUseAcl() : bool
Implements HelperInterface::getUseAcl().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getUseAcl() |
---|
bool
whether 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() |
---|
bool
whether the helper has a an ACL instance or nothasContainer() : bool
Implements HelperInterface::hasContainer().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasContainer() |
---|
bool
whether the helper has a container or nothasRole() : bool
Implements HelperInterface::hasRole().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasRole() |
---|
bool
whether the helper has a an ACL role or nothasTranslator() : bool
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasTranslator() |
---|
bool
htmlify(\Zend\Navigation\Page\AbstractPage $page, bool $escapeLabel) : string
Overrides AbstractHelper::htmlify().
bool
Whether or not to escape the label
string
HTML string for the given pageisTranslatorEnabled() : bool
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::isTranslatorEnabled() |
---|
bool
render(\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 |
---|
string
helper 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
string
rendered 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 |
string
helper 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()}.
string
rendered 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\AbstractHelper
fluent 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\AbstractHelper
fluent 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() |
---|
stringint
indentation string or number of spaces
\Zend\View\Helper\Navigation\AbstractHelper
fluent 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\AbstractHelper
fluent 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\AbstractHelper
fluent interface, returns selfsetOnlyActiveBranch(bool $flag) : \Zend\View\Helper\Navigation\Menu
bool
[optional] render only active branch. Default is true.
\Zend\View\Helper\Navigation\Menu
fluent interface, returns selfsetPartial(string | array $partial) : \Zend\View\Helper\Navigation\Menu
stringarray
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.
\Zend\View\Helper\Navigation\Menu
fluent 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\AbstractHelper
fluent 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\Menu
fluent 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\AbstractHelper
fluent 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
string
CSS class to set
\Zend\View\Helper\Navigation\Menu
fluent 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\AbstractHelper
fluent 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() |
---|
bool
whether page is accepted by ACLgetWhitespace(int | string $indent) : string
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getWhitespace() |
---|
intstring
string
htmlAttribs(array $attribs) : string
Overloads View\Helper\AbstractHtmlElement::htmlAttribs().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::htmlAttribs() |
---|
array
an array where each key-value pair is converted to an attribute name and value
string
an attribute stringisXhtml() : bool
inherited_from | \Zend\View\Helper\AbstractHtmlElement::isXhtml() |
---|---|
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::isXhtml() |
bool
normalizeId(string $value) : string
Overrides View\Helper\AbstractHtmlElement::normalizeId().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::normalizeId() |
---|
string
string
normalizeOptions(array $options) : array
array
[optional] options to normalize
array
normalized 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
string
CSS class for first UL
string
initial indentation
intnull
minimum depth
intnull
maximum depth
bool
Whether or not to escape the labels
string
rendered menurenderNormalMenu(\Zend\Navigation\AbstractContainer $container, string $ulClass, string $indent, int | null $minDepth, int | null $maxDepth, bool $onlyActive, bool $escapeLabels) : string
string
CSS class for first UL
string
initial indentation
intnull
minimum depth
intnull
maximum depth
bool
render only active branch?
bool
Whether 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 |