Interface for navigational helpers

 Methods

Magic overload: Should proxy to {@link render()}.

__toString() : string

Returns

string

Returns ACL or null if it isn't set using {@link setAcl()} or {@link setDefaultAcl()}

getAcl() : \Zend\Permissions\Acl\AclInterface | null

Returns the navigation container the helper operates on by default

getContainer() : \Zend\Navigation\AbstractContainer

Returns

Return renderInvisible flag

getRenderInvisible() : bool

Returns

bool

Returns ACL role to use when iterating pages, or null if it isn't set

getRole() : string | \Zend\Permissions\Acl\Role\RoleInterface | null

Returns whether ACL should be used

getUseAcl() : bool

Returns

bool

Checks if the helper has an ACL instance

hasAcl() : bool

Returns

bool

Checks if the helper has a container

hasContainer() : bool

Returns

bool

Checks if the helper has an ACL role

hasRole() : bool

Returns

bool

Renders helper

render(string | \Zend\Navigation\AbstractContainer $container) : string

Parameters

$container

string\Zend\Navigation\AbstractContainer

[optional] container to render. Default is null, which indicates that the helper should render the container returned by {@link getContainer()}.

Exceptions

\Zend\View\Exception\ExceptionInterface

Returns

stringhelper output

Sets ACL to use when iterating pages

setAcl(\Zend\Permissions\Acl\AclInterface $acl) : \Zend\View\Helper\Navigation\HelperInterface

Sets navigation container the helper should operate on by default

setContainer(string | \Zend\Navigation\AbstractContainer $container) : \Zend\View\Helper\Navigation\HelperInterface

Parameters

$container

string\Zend\Navigation\AbstractContainer

[optional] container to operate on. Default is null, which indicates that the container should be reset.

Returns

Render invisible items?

setRenderInvisible(bool $renderInvisible) : \Zend\View\Helper\Navigation\HelperInterface

Parameters

$renderInvisible

bool

[optional] boolean flag

Returns

Sets ACL role to use when iterating pages

setRole(mixed $role) : \Zend\View\Helper\Navigation\HelperInterface

Parameters

$role

mixed

[optional] role to set. Expects a string, an instance of type {@link Acl\Role}, or null. Default is null.

Exceptions

\Zend\View\Exception\ExceptionInterface if $role is invalid

Returns

Sets whether ACL should be used

setUseAcl(bool $useAcl) : \Zend\View\Helper\Navigation\HelperInterface

Parameters

$useAcl

bool

[optional] whether ACL should be used. Default is true.

Returns