Zend Framework
1.12
|
Public Member Functions | |
setContainer (Zend_Navigation_Container $container=null) | |
Sets navigation container the helper operates on by default. | |
getContainer () | |
Returns the navigation container helper operates on by default. | |
setMinDepth ($minDepth=null) | |
Sets the minimum depth a page must have to be included when rendering. | |
getMinDepth () | |
Returns minimum depth a page must have to be included when rendering. | |
setMaxDepth ($maxDepth=null) | |
Sets the maximum depth a page can have to be included when rendering. | |
getMaxDepth () | |
Returns maximum depth a page can have to be included when rendering. | |
setIndent ($indent) | |
Set the indentation string for using in render(), optionally a number of spaces to indent with. | |
getIndent () | |
Returns indentation (format output is respected) | |
getEOL () | |
Returns the EOL character (format output is respected) | |
setFormatOutput ($formatOutput=true) | |
Sets whether HTML/XML output should be formatted. | |
getFormatOutput () | |
Returns whether HTML/XML output should be formatted. | |
setPrefixForId ($prefix) | |
Sets prefix for IDs when they are normalized. | |
getPrefixForId () | |
Returns prefix for IDs when they are normalized. | |
skipPrefixForId ($flag=true) | |
Skip the current prefix for IDs when they are normalized. | |
setTranslator ($translator=null) | |
Sets translator to use in helper. | |
getTranslator () | |
Returns translator used in helper. | |
setAcl (Zend_Acl $acl=null) | |
Sets ACL to use when iterating pages. | |
getAcl () | |
Returns ACL or null if it isn't set using setAcl() or setDefaultAcl(). | |
setRole ($role=null) | |
Sets ACL role(s) to use when iterating pages. | |
getRole () | |
Returns ACL role to use when iterating pages, or null if it isn't set using setRole() or setDefaultRole(). | |
setUseAcl ($useAcl=true) | |
Sets whether ACL should be used. | |
getUseAcl () | |
Returns whether ACL should be used. | |
getRenderInvisible () | |
Return renderInvisible flag. | |
setRenderInvisible ($renderInvisible=true) | |
Render invisible items? | |
setUseTranslator ($useTranslator=true) | |
Sets whether translator should be used. | |
getUseTranslator () | |
Returns whether translator should be used. | |
__call ($method, array $arguments=array()) | |
Magic overload: Proxy calls to the navigation container. | |
__toString () | |
Magic overload: Proxy to render(). | |
findActive (Zend_Navigation_Container $container, $minDepth=null, $maxDepth=-1) | |
Finds the deepest active page in the given container. | |
hasContainer () | |
Checks if the helper has a container. | |
hasAcl () | |
Checks if the helper has an ACL instance. | |
hasRole () | |
Checks if the helper has an ACL role. | |
hasTranslator () | |
Checks if the helper has a translator. | |
htmlify (Zend_Navigation_Page $page) | |
Returns an HTML string containing an 'a' element for the given page. | |
accept (Zend_Navigation_Page $page, $recursive=true) | |
Determines whether a page should be accepted when iterating. | |
![]() | |
getClosingBracket () | |
Get the tag closing bracket. | |
![]() | |
setView (Zend_View_Interface $view) | |
Set the View object. | |
direct () | |
Strategy pattern: currently unutilized. | |
![]() | |
render (Zend_Navigation_Container $container=null) | |
Renders helper. | |
Static Public Member Functions | |
static | setDefaultAcl (Zend_Acl $acl=null) |
Sets default ACL to use if another ACL is not explicitly set. | |
static | setDefaultRole ($role=null) |
Sets default ACL role(s) to use when iterating pages if not explicitly set later with setRole(). | |
Protected Member Functions | |
_acceptAcl (Zend_Navigation_Page $page) | |
Determines whether a page should be accepted by ACL when iterating. | |
_getWhitespace ($indent) | |
Retrieve whitespace representation of $indent. | |
_htmlAttribs ($attribs) | |
Converts an associative array to a string of tag attributes. | |
_normalizeId ($value) | |
Normalize an ID. | |
![]() | |
_isXhtml () | |
Is doctype XHTML? | |
_isHtml5 () | |
Is doctype HTML5? | |
_isStrictDoctype () | |
Is doctype strict? | |
_htmlAttribs ($attribs) | |
Converts an associative array to a string of tag attributes. | |
_normalizeId ($value) | |
Normalize an ID. | |
Protected Attributes | |
$_container | |
$_minDepth | |
$_maxDepth | |
$_indent = '' | |
$_formatOutput = true | |
$_prefixForId = null | |
$_skipPrefixForId = false | |
$_translator | |
$_acl | |
$_renderInvisible = false | |
$_role | |
$_useTranslator = true | |
$_useAcl = true | |
![]() | |
$_closingBracket = null | |
Static Protected Attributes | |
static | $_defaultAcl |
static | $_defaultRole |
Additional Inherited Members | |
![]() | |
const | EOL = "\n" |
EOL character. | |
__call | ( | $method, | |
array | $arguments = array() |
||
) |
Magic overload: Proxy calls to the navigation container.
string | $method | method name in container |
array | $arguments | [optional] arguments to pass |
Zend_Navigation_Exception | if method does not exist in container |
__toString | ( | ) |
Magic overload: Proxy to render().
This method will trigger an E_USER_ERROR if rendering the helper causes an exception to be thrown.
Implements Zend_View_Helper_Navigation_Helper::__toString().
Implements Zend_View_Helper_Navigation_Helper.
|
protected |
Determines whether a page should be accepted by ACL when iterating.
Rules:
Zend_Navigation_Page | $page | page to check |
|
protected |
Retrieve whitespace representation of $indent.
int | string | $indent |
|
protected |
Converts an associative array to a string of tag attributes.
Overloads Zend_View_Helper_HtmlElement::_htmlAttribs().
array | $attribs | an array where each key-value pair is converted to an attribute name and value |
|
protected |
Normalize an ID.
Extends Zend_View_Helper_HtmlElement::_normalizeId().
string | $value | ID |
accept | ( | Zend_Navigation_Page | $page, |
$recursive = true |
|||
) |
Determines whether a page should be accepted when iterating.
Rules:
Zend_Navigation_Page | $page | page to check |
bool | $recursive | [optional] if true, page will not be accepted if it is the descendant of a page that is not accepted. Default is true. |
findActive | ( | Zend_Navigation_Container | $container, |
$minDepth = null , |
|||
$maxDepth = -1 |
|||
) |
Finds the deepest active page in the given container.
Zend_Navigation_Container | $container | container to search |
int | null | $minDepth | [optional] minimum depth required for page to be valid. Default is to use getMinDepth(). A null value means no minimum depth required. |
int | null | $minDepth | [optional] maximum depth a page can have to be valid. Default is to use getMaxDepth(). A null value means no maximum depth required. |
getAcl | ( | ) |
Returns ACL or null if it isn't set using setAcl() or setDefaultAcl().
Implements Zend_View_Helper_Navigation_Helper::getAcl().
Implements Zend_View_Helper_Navigation_Helper.
getContainer | ( | ) |
Returns the navigation container helper operates on by default.
Implements Zend_View_Helper_Navigation_Interface::getContainer().
If a helper is not explicitly set in this helper instance by calling setContainer() or by passing it through the helper entry point, this method will look in 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.
Implements Zend_View_Helper_Navigation_Helper.
getEOL | ( | ) |
Returns the EOL character (format output is respected)
getFormatOutput | ( | ) |
Returns whether HTML/XML output should be formatted.
getIndent | ( | ) |
Returns indentation (format output is respected)
getMaxDepth | ( | ) |
Returns maximum depth a page can have to be included when rendering.
getMinDepth | ( | ) |
Returns minimum depth a page must have to be included when rendering.
getPrefixForId | ( | ) |
Returns prefix for IDs when they are normalized.
getRenderInvisible | ( | ) |
getRole | ( | ) |
Returns ACL role to use when iterating pages, or null if it isn't set using setRole() or setDefaultRole().
Implements Zend_View_Helper_Navigation_Helper::getRole().
Implements Zend_View_Helper_Navigation_Helper.
getTranslator | ( | ) |
Returns translator used in helper.
Implements Zend_View_Helper_Navigation_Helper::getTranslator().
Implements Zend_View_Helper_Navigation_Helper.
getUseAcl | ( | ) |
Returns whether ACL should be used.
Implements Zend_View_Helper_Navigation_Helper::getUseAcl().
Implements Zend_View_Helper_Navigation_Helper.
getUseTranslator | ( | ) |
Returns whether translator should be used.
Implements Zend_View_Helper_Navigation_Helper::getUseTranslator().
Implements Zend_View_Helper_Navigation_Helper.
hasAcl | ( | ) |
Checks if the helper has an ACL instance.
Implements Zend_View_Helper_Navigation_Helper::hasAcl().
Implements Zend_View_Helper_Navigation_Helper.
hasContainer | ( | ) |
Checks if the helper has a container.
Implements Zend_View_Helper_Navigation_Helper::hasContainer().
Implements Zend_View_Helper_Navigation_Helper.
hasRole | ( | ) |
Checks if the helper has an ACL role.
Implements Zend_View_Helper_Navigation_Helper::hasRole().
Implements Zend_View_Helper_Navigation_Helper.
hasTranslator | ( | ) |
Checks if the helper has a translator.
Implements Zend_View_Helper_Navigation_Helper::hasTranslator().
Implements Zend_View_Helper_Navigation_Helper.
htmlify | ( | Zend_Navigation_Page | $page | ) |
Returns an HTML string containing an 'a' element for the given page.
Zend_Navigation_Page | $page | page to generate HTML for |
setAcl | ( | Zend_Acl | $acl = null | ) |
Sets ACL to use when iterating pages.
Implements Zend_View_Helper_Navigation_Helper::setAcl().
Zend_Acl | $acl | [optional] ACL object. Default is null. |
Implements Zend_View_Helper_Navigation_Helper.
setContainer | ( | Zend_Navigation_Container | $container = null | ) |
Sets navigation container the helper operates on by default.
Implements Zend_View_Helper_Navigation_Interface::setContainer().
Zend_Navigation_Container | $container | [optional] container to operate on. Default is null, meaning container will be reset. |
Implements Zend_View_Helper_Navigation_Helper.
|
static |
Sets default ACL to use if another ACL is not explicitly set.
Zend_Acl | $acl | [optional] ACL object. Default is null, which sets no ACL object. |
|
static |
Sets default ACL role(s) to use when iterating pages if not explicitly set later with setRole().
midex | $role | [optional] role to set. Expects null, string, or an instance of Zend_Acl_Role_Interface. Default is null, which sets no default role. |
Zend_View_Exception | if role is invalid |
setFormatOutput | ( | $formatOutput = true | ) |
Sets whether HTML/XML output should be formatted.
bool | $formatOutput | [optional] whether output should be formatted. Default is true. |
setIndent | ( | $indent | ) |
Set the indentation string for using in render(), optionally a number of spaces to indent with.
string | int | $indent | indentation string or number of spaces |
setMaxDepth | ( | $maxDepth = null | ) |
Sets the maximum depth a page can have to be included when rendering.
int | $maxDepth | [optional] maximum depth. Default is null, which sets no maximum depth. |
setMinDepth | ( | $minDepth = null | ) |
Sets the minimum depth a page must have to be included when rendering.
int | $minDepth | [optional] minimum depth. Default is null, which sets no minimum depth. |
setPrefixForId | ( | $prefix | ) |
Sets prefix for IDs when they are normalized.
string | $prefix | Prefix for IDs |
setRenderInvisible | ( | $renderInvisible = true | ) |
Render invisible items?
bool | $renderInvisible | [optional] boolean flag |
Implements Zend_View_Helper_Navigation_Helper.
setRole | ( | $role = null | ) |
Sets ACL role(s) to use when iterating pages.
Implements Zend_View_Helper_Navigation_Helper::setRole().
mixed | $role | [optional] role to set. Expects a string, an instance of type Zend_Acl_Role_Interface, or null. Default is null, which will set no role. |
Zend_View_Exception | if $role is invalid |
Implements Zend_View_Helper_Navigation_Helper.
setTranslator | ( | $translator = null | ) |
Sets translator to use in helper.
Implements Zend_View_Helper_Navigation_Helper::setTranslator().
mixed | $translator | [optional] translator. Expects an object of type Zend_Translate_Adapter or Zend_Translate, or null. Default is null, which sets no translator. |
Implements Zend_View_Helper_Navigation_Helper.
setUseAcl | ( | $useAcl = true | ) |
Sets whether ACL should be used.
Implements Zend_View_Helper_Navigation_Helper::setUseAcl().
bool | $useAcl | [optional] whether ACL should be used. Default is true. |
Implements Zend_View_Helper_Navigation_Helper.
setUseTranslator | ( | $useTranslator = true | ) |
Sets whether translator should be used.
Implements Zend_View_Helper_Navigation_Helper::setUseTranslator().
bool | $useTranslator | [optional] whether translator should be used. Default is true. |
Implements Zend_View_Helper_Navigation_Helper.
skipPrefixForId | ( | $flag = true | ) |
Skip the current prefix for IDs when they are normalized.
bool | $flag |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |