__call()
__invoke()
__toString()
accept()
escapeLabels()
findActive()
getAcl()
getAddClassToListItem()
getClosingBracket()
getContainer()
getEventManager()
getIndent()
getLiActiveClass()
getMaxDepth()
getMinDepth()
getOnlyActiveBranch()
getPartial()
getRenderInvisible()
getRenderParents()
getRole()
getServiceLocator()
getTranslator()
getTranslatorTextDomain()
getUlClass()
getUseAcl()
getView()
hasAcl()
hasContainer()
hasRole()
hasTranslator()
htmlify()
isTranslatorEnabled()
render()
renderMenu()
renderPartial()
renderSubMenu()
setAcl()
setAddClassToListItem()
setContainer()
setDefaultAcl()
setDefaultRole()
setEventManager()
setIndent()
setLiActiveClass()
setMaxDepth()
setMinDepth()
setOnlyActiveBranch()
setPartial()
setRenderInvisible()
setRenderParents()
setRole()
setServiceLocator()
setTranslator()
setTranslatorEnabled()
setTranslatorTextDomain()
setUlClass()
setUseAcl()
setView()
getWhitespace()
htmlAttribs()
isAllowed()
isXhtml()
normalizeId()
normalizeOptions()
parseContainer()
renderDeepestMenu()
renderNormalMenu()
setDefaultListeners()
translate()
$acl
$addClassToListItem
$closingBracket
$container
$defaultAcl
$defaultRole
$escapeLabels
$events
$indent
$liActiveClass
$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
rguments to pass
\Zend\Navigation\Exception\ExceptionInterface |
---|
mixed
__invoke(\Zend\Navigation\AbstractContainer $container) : \Zend\View\Helper\Navigation\self
\Zend\View\Helper\Navigation\self
__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
Default listener may be 'overridden' by attaching listener to 'isAllowed' method. Listener must be 'short circuited' if overriding default ACL listener.
Rules: - If a page is not visible it is not accepted, unless RenderInvisible has been set to true - If $useAcl is true (default is true): - Page is accepted if listener returns true, otherwise false - If page is accepted 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\self
bool
[optional] escape labels
\Zend\View\Helper\Navigation\self
findActive(\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 nullgetAddClassToListItem() : bool
By default, this value is false.
bool
whether parents should be renderedgetClosingBracket() : 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 containergetEventManager() : \Zend\EventManager\EventManagerInterface
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getEventManager() |
---|
getIndent() : string
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getIndent() |
---|
string
getLiActiveClass() : string
string
getMaxDepth() : int | null
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getMaxDepth() |
---|
int
null
getMinDepth() : int | null
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getMinDepth() |
---|
int
null
getOnlyActiveBranch() : bool
By default, this value is false, meaning the entire menu will be be rendered.
bool
getPartial() : 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
getRole() : 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\TranslatorInterface | null
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getTranslator() |
---|
getTranslatorTextDomain() : string
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getTranslatorTextDomain() |
---|
string
getUlClass() : string
string
getUseAcl() : bool
Implements HelperInterface::getUseAcl().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::getUseAcl() |
---|
bool
getView() : 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
hasContainer() : bool
Implements HelperInterface::hasContainer().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasContainer() |
---|
bool
hasRole() : bool
Implements HelperInterface::hasRole().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasRole() |
---|
bool
hasTranslator() : bool
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::hasTranslator() |
---|
bool
htmlify(\Zend\Navigation\Page\AbstractPage $page, bool $escapeLabel, bool $addClassToListItem) : string
Overrides AbstractHelper::htmlify().
bool
Whether or not to escape the label
bool
Whether or not to add the page class to the list item
string
isTranslatorEnabled() : 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 |
---|
string
renderMenu(\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
renderPartial(\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
renderSubMenu(\Zend\Navigation\AbstractContainer $container, string $ulClass, string | int $indent, string $liActiveClass) : 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,
'liActiveClass' => $liActiveClass
));
\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
[optional] CSS class to use for UL element. Default is to use the value from {@link getUlClass()}.
string
setAcl(\Zend\Permissions\Acl\AclInterface $acl) : \Zend\View\Helper\Navigation\AbstractHelper
Implements HelperInterface::setAcl().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setAcl() |
---|
setAddClassToListItem(bool $flag) : \Zend\View\Helper\Navigation\self
bool
[optional] page class applied to
\Zend\View\Helper\Navigation\self
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
Default is null, meaning container will be reset.
setDefaultAcl(\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 |
---|
setEventManager(\Zend\EventManager\EventManagerInterface $events) : \Zend\View\Helper\Navigation\AbstractHelper
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setEventManager() |
---|
setIndent(string | int $indent) : \Zend\View\Helper\Navigation\AbstractHelper
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setIndent() |
---|
stringint
setLiActiveClass(string $liActiveClass) : \Zend\View\Helper\Navigation\self
string
CSS class to set
\Zend\View\Helper\Navigation\self
setMaxDepth(int $maxDepth) : \Zend\View\Helper\Navigation\AbstractHelper
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setMaxDepth() |
---|
int
Default is null, which sets no maximum depth.
setMinDepth(int $minDepth) : \Zend\View\Helper\Navigation\AbstractHelper
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setMinDepth() |
---|
int
Default is null, which sets no minimum depth.
setOnlyActiveBranch(bool $flag) : \Zend\View\Helper\Navigation\self
bool
[optional] render only active branch.
\Zend\View\Helper\Navigation\self
setPartial(string | array $partial) : \Zend\View\Helper\Navigation\self
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\self
setRenderInvisible(bool $renderInvisible) : \Zend\View\Helper\Navigation\AbstractHelper
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setRenderInvisible() |
---|
bool
setRenderParents(bool $flag) : \Zend\View\Helper\Navigation\self
See setOnlyActiveBranch() for more information.
bool
[optional] render parents when rendering active branch.
\Zend\View\Helper\Navigation\self
setRole(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 |
---|
setServiceLocator(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator) : \Zend\View\Helper\Navigation\AbstractHelper
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setServiceLocator() |
---|
\Zend\ServiceManager\ServiceLocatorInterface
setTranslator(\Zend\I18n\Translator\TranslatorInterface $translator, string $textDomain) : \Zend\View\Helper\Navigation\AbstractHelper
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setTranslator() |
---|
\Zend\I18n\Translator\TranslatorInterface
[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
setTranslatorTextDomain(string $textDomain) : \Zend\View\Helper\Navigation\AbstractHelper
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setTranslatorTextDomain() |
---|
string
setUlClass(string $ulClass) : \Zend\View\Helper\Navigation\self
string
CSS class to set
\Zend\View\Helper\Navigation\self
setUseAcl(bool $useAcl) : \Zend\View\Helper\Navigation\AbstractHelper
Implements HelperInterface::setUseAcl().
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setUseAcl() |
---|
bool
setView(\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() |
getWhitespace(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
isAllowed(array $params) : bool
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::isAllowed() |
---|
array
bool
isXhtml() : 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
parseContainer(\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, bool $addClassToListItem, string $liActiveClass) : string
string
CSS class for first UL
string
initial indentation
intnull
minimum depth
intnull
maximum depth
bool
Whether or not to escape the labels
bool
Whether or not page class applied to
string
CSS class for active LI
string
renderNormalMenu(\Zend\Navigation\AbstractContainer $container, string $ulClass, string $indent, int | null $minDepth, int | null $maxDepth, bool $onlyActive, bool $escapeLabels, bool $addClassToListItem, string $liActiveClass) : 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
bool
Whether or not page class applied to
string
CSS class for active LI
string
setDefaultListeners()
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::setDefaultListeners() |
---|
translate(string $message, string $textDomain) : string
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::translate() |
---|
string
ID of the message to translate
string
Text domain (category name for the translations)
string
Translated message$acl : \Zend\Permissions\Acl\AclInterface
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$acl |
---|
$addClassToListItem : bool
$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
$events : \Zend\EventManager\EventManagerInterface
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$events |
---|
$indent : string
inherited_from | \Zend\View\Helper\Navigation\AbstractHelper::$$indent |
---|
$liActiveClass : string
$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\TranslatorInterface
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 |