View/Helper/Navigation/HelperAbstract.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_View
- Subpackage
- Helper
- Version
- $Id$
\Zend_View_Helper_Navigation_HelperAbstract
- Implements
- Parent(s)
- \Zend_View_Helper_HtmlElement < \Zend_View_Helper_Abstract
- Children
- \Zend_View_Helper_Navigation_Menu
- \Zend_View_Helper_Navigation_Breadcrumbs
- \Zend_View_Helper_Navigation_Sitemap
- \Zend_View_Helper_Navigation_Links
- \Zend_View_Helper_Navigation
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
\Zend_Acl $_defaultAcl
- Type
- \Zend_Acl
string|\Zend_Acl_Role_Interface $_defaultRole
- Type
- string | \Zend_Acl_Role_Interface
bool $_formatOutput = true
true
Details- Type
- bool
string|null $_prefixForId = null
null
Details- Type
- string | null
bool $_renderInvisible = false
false
Details- Type
- bool
string|\Zend_Acl_Role_Interface $_role
- Type
- string | \Zend_Acl_Role_Interface
bool $_skipPrefixForId = false
false
Details- Type
- bool
bool $_useAcl = true
true
Details- Type
- bool
Methods
__call(string $method, array $arguments = array()) : mixed
Magic overload: Proxy calls to the navigation container
Name | Type | Description |
---|---|---|
$method | string | method name in container |
$arguments | array | [optional] arguments to pass |
Type | Description |
---|---|
mixed | returns what the container returns |
Exception | Description |
---|---|
\Zend_Navigation_Exception | if method does not exist in container |
__toString() : string
Magic overload: Proxy to {@link render()}.
Type | Description |
---|---|
string |
_acceptAcl(\Zend_Navigation_Page $page) : bool
Determines whether a page should be accepted by ACL when iterating
Name | Type | Description |
---|---|---|
$page | \Zend_Navigation_Page | page to check |
Type | Description |
---|---|
bool | whether page is accepted by ACL |
_getWhitespace(int | string $indent) : string
Retrieve whitespace representation of $indent
Name | Type | Description |
---|---|---|
$indent | int | string |
Type | Description |
---|---|
string |
_htmlAttribs(array $attribs) : string
Converts an associative array to a string of tag attributes.
Name | Type | Description |
---|---|---|
$attribs | array | an array where each key-value pair is converted
|
Type | Description |
---|---|
string | an attribute string |
_normalizeId(string $value) : string
Normalize an ID
Name | Type | Description |
---|---|---|
$value | string | ID |
Type | Description |
---|---|
string | Normalized ID |
accept(\Zend_Navigation_Page $page, bool $recursive = true) : bool
Determines whether a page should be accepted when iterating
Name | Type | Description |
---|---|---|
$page | \Zend_Navigation_Page | page to check |
$recursive | bool | [optional] if true, page will not
|
Type | Description |
---|---|
bool | whether page should be accepted |
findActive(\Zend_Navigation_Container $container, int | null | int | null $minDepth = null, $maxDepth = -1) : array
Finds the deepest active page in the given container
Name | Type | Description |
---|---|---|
$container | \Zend_Navigation_Container | container to search |
$minDepth | int | null | int | null | [optional] minimum depth
|
$maxDepth |
Type | Description |
---|---|
array | an associative array with the values 'depth' and 'page', or an empty array if not found |
getAcl() : \Zend_Acl | null
Returns ACL or null if it isn't set using {@link setAcl()} or {@link setDefaultAcl()}
Type | Description |
---|---|
\Zend_Acl | null | ACL object or null |
getContainer() : \Zend_Navigation_Container
Returns the navigation container helper operates on by default
Type | Description |
---|---|
\Zend_Navigation_Container | navigation container |
getFormatOutput() : bool
Returns whether HTML/XML output should be formatted
Type | Description |
---|---|
bool | whether HTML/XML output should be formatted |
getIndent() : string
Returns indentation (format output is respected)
Type | Description |
---|---|
string | indentation string or an empty string |
getMaxDepth() : int | null
Returns maximum depth a page can have to be included when rendering
Type | Description |
---|---|
int | null | maximum depth or null |
getMinDepth() : int | null
Returns minimum depth a page must have to be included when rendering
Type | Description |
---|---|
int | null | minimum depth or null |
getPrefixForId() : string
Returns prefix for IDs when they are normalized
Type | Description |
---|---|
string | Prefix for |
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()}
Type | Description |
---|---|
string | \Zend_Acl_Role_Interface | null | role or null |
getTranslator() : \Zend_Translate_Adapter | null
Returns translator used in helper
Type | Description |
---|---|
\Zend_Translate_Adapter | null | translator or null |
getUseAcl() : bool
Returns whether ACL should be used
Type | Description |
---|---|
bool | whether ACL should be used |
getUseTranslator() : bool
Returns whether translator should be used
Type | Description |
---|---|
bool | whether translator should be used |
hasAcl() : bool
Checks if the helper has an ACL instance
Type | Description |
---|---|
bool | whether the helper has a an ACL instance or not |
hasContainer() : bool
Checks if the helper has a container
Type | Description |
---|---|
bool | whether the helper has a container or not |
hasRole() : bool
Checks if the helper has an ACL role
Type | Description |
---|---|
bool | whether the helper has a an ACL role or not |
hasTranslator() : bool
Checks if the helper has a translator
Type | Description |
---|---|
bool | whether the helper has a translator or not |
htmlify(\Zend_Navigation_Page $page) : string
Returns an HTML string containing an 'a' element for the given page
Name | Type | Description |
---|---|---|
$page | \Zend_Navigation_Page | page to generate HTML for |
Type | Description |
---|---|
string | HTML string for the given page |
setAcl(\Zend_Acl $acl = null) : \Zend_View_Helper_Navigation_HelperAbstract
Sets ACL to use when iterating pages
Name | Type | Description |
---|---|---|
$acl | \Zend_Acl | [optional] ACL object.
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
setContainer(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_Navigation_HelperAbstract
Sets navigation container the helper operates on by default
Name | Type | Description |
---|---|---|
$container | \Zend_Navigation_Container | [optional] container
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
setDefaultAcl(\Zend_Acl $acl = null) : void
Sets default ACL to use if another ACL is not explicitly set
Name | Type | Description |
---|---|---|
$acl | \Zend_Acl | [optional] ACL object. Default is null, which
|
setDefaultRole(\midex $role = null) : void
Sets default ACL role(s) to use when iterating pages if not explicitly set later with {@link setRole()}
Name | Type | Description |
---|---|---|
$role | \midex | [optional] role to set. Expects null,
|
Exception | Description |
---|---|
\Zend_View_Exception | if role is invalid |
setFormatOutput(bool $formatOutput = true) : \Zend_View_Helper_Navigation_Sitemap
Sets whether HTML/XML output should be formatted
Name | Type | Description |
---|---|---|
$formatOutput | bool | [optional] whether output
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_Sitemap | fluent interface, returns self |
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
Name | Type | Description |
---|---|---|
$indent | string | int | indentation string or number of spaces |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
setMaxDepth(int $maxDepth = null) : \Zend_View_Helper_Navigation_HelperAbstract
Sets the maximum depth a page can have to be included when rendering
Name | Type | Description |
---|---|---|
$maxDepth | int | [optional] maximum
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
setMinDepth(int $minDepth = null) : \Zend_View_Helper_Navigation_HelperAbstract
Sets the minimum depth a page must have to be included when rendering
Name | Type | Description |
---|---|---|
$minDepth | int | [optional] minimum
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
setPrefixForId(string $prefix) : \Zend_View_Helper_Navigation_HelperAbstract
Sets prefix for IDs when they are normalized
Name | Type | Description |
---|---|---|
$prefix | string | Prefix for IDs |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
setRenderInvisible(bool $renderInvisible = true) : \Zend_View_Helper_Navigation_HelperAbstract
Render invisible items?
Name | Type | Description |
---|---|---|
$renderInvisible | bool | [optional] boolean flag |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface returns self |
setRole(mixed $role = null) : \Zend_View_Helper_Navigation_HelperAbstract
Sets ACL role(s) to use when iterating pages
Name | Type | Description |
---|---|---|
$role | mixed | [optional] role to
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
Exception | Description |
---|---|
\Zend_View_Exception | if $role is invalid |
setTranslator(mixed $translator = null) : \Zend_View_Helper_Navigation_HelperAbstract
Sets translator to use in helper
Name | Type | Description |
---|---|---|
$translator | mixed | [optional] translator.
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
setUseAcl(bool $useAcl = true) : \Zend_View_Helper_Navigation_HelperAbstract
Sets whether ACL should be used
Name | Type | Description |
---|---|---|
$useAcl | bool | [optional] whether ACL
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
setUseTranslator(bool $useTranslator = true) : \Zend_View_Helper_Navigation_HelperAbstract
Sets whether translator should be used
Name | Type | Description |
---|---|---|
$useTranslator | bool | [optional] whether
|
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |
skipPrefixForId(bool $flag = true) : \Zend_View_Helper_Navigation_HelperAbstract
Skip the current prefix for IDs when they are normalized
Name | Type | Description |
---|---|---|
$flag | bool |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_HelperAbstract | fluent interface, returns self |