Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Base class for navigational helpers
Zend_Acl $_acl = ''
ACL to use when iterating pages
Zend_Navigation_Container $_container = ''
Container to operate on by default
Zend_Acl $_defaultAcl = ''
Default ACL to use when iterating pages if not explicitly set in the instance by calling {@link setAcl()}
string|Zend_Acl_Role_Interface $_defaultRole = ''
Default ACL role to use when iterating pages if not explicitly set in the instance by calling {@link setRole()}
string $_indent = ''
Indentation string
int $_maxDepth = ''
The maximum depth a page can have to be included when rendering
int $_minDepth = ''
The minimum depth a page must have to be included when rendering
bool $_renderInvisible = 'false'
Wheter invisible items should be rendered by this helper
string|Zend_Acl_Role_Interface $_role = ''
ACL role to use when iterating pages
Zend_Translate_Adapter $_translator = ''
Translator
bool $_useAcl = 'true'
Whether ACL should be used for filtering out pages
bool $_useTranslator = 'true'
Whether translator should be used for page labels and titles
__call(
string $method, array $arguments
=
array
)
:
mixed
Magic overload: Proxy calls to the navigation container
__toString(
)
:
string
Magic overload: Proxy to {@link render()}.
This method will trigger an E_USER_ERROR if rendering the helper causes an exception to be thrown.
Implements {@link Zend_View_Helper_Navigation_Helper::__toString()}.
_acceptAcl(
Zend_Navigation_Page $page
)
:
bool
Determines whether a page should be accepted by ACL when iterating
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
_getWhitespace(
int|string $indent
)
:
string
Retrieve whitespace representation of $indent
_htmlAttribs(
array $attribs
)
:
string
Converts an associative array to a string of tag attributes.
Overloads {@link Zend_View_Helper_HtmlElement::_htmlAttribs()}.
_normalizeId(
string $value
)
:
string
Normalize an ID
Overrides {@link Zend_View_Helper_HtmlElement::_normalizeId()}.
accept(
Zend_Navigation_Page $page, bool $recursive
=
true
)
:
bool
Determines whether a page should be accepted when iterating
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.
findActive(
Zend_Navigation_Container $container, int|null|int|null $minDepth
=
null, $maxDepth
=
1
)
:
array
Finds the deepest active page in the given container
getAcl(
)
:
Zend_Acl|null
Returns ACL or null if it isn't set using {@link setAcl()} or {@link setDefaultAcl()}
Implements {@link Zend_View_Helper_Navigation_Helper::getAcl()}.
getContainer(
)
:
Zend_Navigation_Container
Returns the navigation container helper operates on by default
Implements {@link Zend_View_Helper_Navigation_Interface::getContainer()}.
If a helper is not explicitly set in this helper instance by calling {@link setContainer()} or by passing it through the helper entry point, this method will look in {@link Zend_Registry} for a container by using the key 'Zend_Navigation'.
If no container is set, and nothing is found in Zend_Registry, a new container will be instantiated and stored in the helper.
getIndent(
)
:
string
Returns indentation
getMaxDepth(
)
:
int|null
Returns maximum depth a page can have to be included when rendering
getMinDepth(
)
:
int|null
Returns minimum depth a page must have to be included when rendering
getRenderInvisible(
)
:
bool
Return renderInvisible flag
getRole(
)
:
string|Zend_Acl_Role_Interface|null
Returns ACL role to use when iterating pages, or null if it isn't set using {@link setRole()} or {@link setDefaultRole()}
Implements {@link Zend_View_Helper_Navigation_Helper::getRole()}.
getTranslator(
)
:
Zend_Translate_Adapter|null
Returns translator used in helper
Implements {@link Zend_View_Helper_Navigation_Helper::getTranslator()}.
getUseAcl(
)
:
bool
Returns whether ACL should be used
Implements {@link Zend_View_Helper_Navigation_Helper::getUseAcl()}.
getUseTranslator(
)
:
bool
Returns whether translator should be used
Implements {@link Zend_View_Helper_Navigation_Helper::getUseTranslator()}.
hasAcl(
)
:
bool
Checks if the helper has an ACL instance
Implements {@link Zend_View_Helper_Navigation_Helper::hasAcl()}.
hasContainer(
)
:
bool
Checks if the helper has a container
Implements {@link Zend_View_Helper_Navigation_Helper::hasContainer()}.
hasRole(
)
:
bool
Checks if the helper has an ACL role
Implements {@link Zend_View_Helper_Navigation_Helper::hasRole()}.
hasTranslator(
)
:
bool
Checks if the helper has a translator
Implements {@link Zend_View_Helper_Navigation_Helper::hasTranslator()}.
htmlify(
Zend_Navigation_Page $page
)
:
string
Returns an HTML string containing an 'a' element for the given page
setAcl(
Zend_Acl $acl
=
null
)
:
Zend_View_Helper_Navigation_HelperAbstract
Sets ACL to use when iterating pages
Implements {@link Zend_View_Helper_Navigation_Helper::setAcl()}.
setContainer(
Zend_Navigation_Container $container
=
null
)
:
Zend_View_Helper_Navigation_HelperAbstract
Sets navigation container the helper operates on by default
Implements {@link Zend_View_Helper_Navigation_Interface::setContainer()}.
setDefaultAcl(
Zend_Acl $acl
=
null
)
:
void
Sets default ACL to use if another ACL is not explicitly set
setDefaultRole(
midex $role
=
null
)
:
void
Sets default ACL role(s) to use when iterating pages if not explicitly set later with {@link setRole()}
setIndent(
string|int $indent
)
:
Zend_View_Helper_Navigation_HelperAbstract
Set the indentation string for using in {@link render()}, optionally a number of spaces to indent with
setMaxDepth(
int $maxDepth
=
null
)
:
Zend_View_Helper_Navigation_HelperAbstract
Sets the maximum depth a page can have to be included when rendering
setMinDepth(
int $minDepth
=
null
)
:
Zend_View_Helper_Navigation_HelperAbstract
Sets the minimum depth a page must have to be included when rendering
setRenderInvisible(
bool $renderInvisible
=
true
)
:
Zend_View_Helper_Navigation_HelperAbstract
Render invisible items?
setRole(
mixed $role
=
null
)
:
Zend_View_Helper_Navigation_HelperAbstract
Sets ACL role(s) to use when iterating pages
Implements {@link Zend_View_Helper_Navigation_Helper::setRole()}.
setTranslator(
mixed $translator
=
null
)
:
Zend_View_Helper_Navigation_HelperAbstract
Sets translator to use in helper
Implements {@link Zend_View_Helper_Navigation_Helper::setTranslator()}.
setUseAcl(
bool $useAcl
=
true
)
:
Zend_View_Helper_Navigation_HelperAbstract
Sets whether ACL should be used
Implements {@link Zend_View_Helper_Navigation_Helper::setUseAcl()}.
setUseTranslator(
bool $useTranslator
=
true
)
:
Zend_View_Helper_Navigation_HelperAbstract
Sets whether translator should be used
Implements {@link Zend_View_Helper_Navigation_Helper::setUseTranslator()}.