Zend\View\Helper\Navigation\AbstractHelper
Base class for navigational helpers
Synopsis
class AbstractHelper
extends AbstractHtmlElement
implements
EventManagerAwareInterface,HelperInterface,ServiceLocatorAwareInterface,TranslatorAwareInterface
{
- // Inherited constants from AbstractHtmlElement
- const EOL = ;
- // members
- protected EventManagerInterface $events;
- protected ServiceLocatorInterface $serviceLocator;
- protected AbstractContainer $container;
- protected int $minDepth;
- protected int $maxDepth;
- protected string $indent;
- protected AclInterface $acl;
- protected bool $renderInvisible;
- protected RoleInterface $role;
- protected bool $useAcl;
- protected TranslatorInterface $translator;
- protected string $translatorTextDomain;
- protected bool $translatorEnabled;
- protected AclInterface $defaultAcl;
- protected RoleInterface $defaultRole;
- // Inherited members from AbstractHtmlElement
- protected string $closingBracket;
- // Inherited members from AbstractHelper
- protected RendererInterface $view;
- // methods
- public mixed __call()
- public string __toString()
- public array findActive()
- protected void parseContainer()
- public bool accept()
- protected bool isAllowed()
- protected string getWhitespace()
- protected string htmlAttribs()
- public string htmlify()
- protected string translate()
- protected string normalizeId()
- public AbstractHelper setAcl()
- public AclInterface|null getAcl()
- public bool hasAcl()
- public AbstractHelper setEventManager()
- public EventManagerInterface getEventManager()
- public AbstractHelper setContainer()
- public AbstractContainer getContainer()
- public bool hasContainer()
- public AbstractHelper setIndent()
- public string getIndent()
- public AbstractHelper setMaxDepth()
- public int|null getMaxDepth()
- public AbstractHelper setMinDepth()
- public int|null getMinDepth()
- public AbstractHelper setRenderInvisible()
- public bool getRenderInvisible()
- public AbstractHelper setRole()
- public RoleInterface|null getRole()
- public bool hasRole()
- public AbstractHelper setServiceLocator()
- public ServiceLocatorInterface getServiceLocator()
- public AbstractHelper setTranslator()
- public Translator|null getTranslator()
- public bool hasTranslator()
- public AbstractHelper setTranslatorEnabled()
- public bool isTranslatorEnabled()
- public AbstractHelper setTranslatorTextDomain()
- public string getTranslatorTextDomain()
- public AbstractHelper setUseAcl()
- public bool getUseAcl()
- public static void setDefaultAcl()
- public static void setDefaultRole()
- protected void setDefaultListeners()
- // Inherited methods from AbstractHtmlElement
- public string getClosingBracket()
- protected bool isXhtml()
- protected string htmlAttribs()
- protected string normalizeId()
- // Inherited methods from AbstractHelper
- public AbstractHelper setView()
- public null|Renderer getView()
Hierarchy
Extends
Extended by
- Zend\View\Helper\Navigation\Menu
- Zend\View\Helper\Navigation\Sitemap
- Zend\View\Helper\Navigation\Breadcrumbs
- Zend\View\Helper\Navigation\Links
- Zend\View\Helper\Navigation
Implements
Constants
Name | Value |
---|---|
EOL |
Members
protected
- $acl
—
Zend\View\Helper\Navigation\Acl\AclInterface
ACL to use when iterating pages - $closingBracket
—
string
The tag closing bracket - $container
—
Zend\View\Helper\Navigation\Navigation\AbstractContainer
AbstractContainer to operate on by default - $defaultAcl
—
Zend\View\Helper\Navigation\Acl\AclInterface
Default ACL to use when iterating pages if not explicitly set in the instance by calling {@link setAcl()} - $defaultRole
—
Zend\View\Helper\Navigation\string|Acl\Role\RoleInterface
Default ACL role to use when iterating pages if not explicitly set in the instance by calling {@link setRole()} - $events — Zend\EventManager\EventManagerInterface
- $indent
—
string
Indentation string - $maxDepth
—
int
The maximum depth a page can have to be included when rendering - $minDepth
—
int
The minimum depth a page must have to be included when rendering - $renderInvisible
—
Zend\View\Helper\Navigation\bool
Whether invisible items should be rendered by this helper - $role
—
Zend\View\Helper\Navigation\string|Acl\Role\RoleInterface
ACL role to use when iterating pages - $serviceLocator — Zend\ServiceManager\ServiceLocatorInterface
- $translator
—
Zend\I18n\Translator\TranslatorInterface
Translator (optional) - $translatorEnabled
—
Zend\View\Helper\Navigation\bool
Whether translator should be used - $translatorTextDomain
—
string
Translator text domain (optional) - $useAcl
—
Zend\View\Helper\Navigation\bool
Whether ACL should be used for filtering out pages - $view
—
Zend\View\Renderer\RendererInterface
View object instance
Methods
protected
- getWhitespace() — Retrieve whitespace representation of $indent
- htmlAttribs() — Converts an associative array to a string of tag attributes.
- isAllowed() — Determines whether a page should be allowed given certain parameters
- normalizeId() — Normalize an ID
- parseContainer() — Verifies container and eventually fetches it from service locator if it is a string
- setDefaultListeners() — Attaches default ACL listeners, if ACLs are in use
- translate() — Translate a message (for label, title, …)
public
- __call() — Magic overload: Proxy calls to the navigation container
- __toString() — Magic overload: Proxy to {@link render()}.
- accept() — Determines whether a page should be accepted when iterating
- findActive() — Finds the deepest active page in the given container
- getAcl() — Returns ACL or null if it isn't set using {@link setAcl()} or {@link setDefaultAcl()}
- getContainer() — Returns the navigation container helper operates on by default
- getEventManager() — Get the event manager.
- getIndent() — Returns indentation
- 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
- getRenderInvisible() — Return renderInvisible flag
- getRole() — Returns ACL role to use when iterating pages, or null if it isn't set using {@link setRole()} or {@link setDefaultRole()}
- getServiceLocator() — Get the service locator.
- getTranslator() — Returns translator used in helper
- getTranslatorTextDomain() — Return the translation text domain
- getUseAcl() — Returns whether ACL should be used
- hasAcl() — Checks if the helper has an ACL instance
- hasContainer() — Checks if the helper has a container
- hasRole() — Checks if the helper has an ACL role
- hasTranslator() — Checks if the helper has a translator
- htmlify() — Returns an HTML string containing an 'a' element for the given page
- isTranslatorEnabled() — Returns whether translator is enabled and should be used
- setAcl() — Sets ACL to use when iterating pages
- setContainer() — Sets navigation container the helper operates on by default
- setDefaultAcl() — Sets default ACL to use if another ACL is not explicitly set
- setDefaultRole() — Sets default ACL role(s) to use when iterating pages if not explicitly set later with {@link setRole()}
- setEventManager() — Set the event manager.
- setIndent() — Set the indentation string for using in {@link render()}, optionally a number of spaces to indent with
- setMaxDepth() — Sets the maximum depth a page can have to be included when rendering
- setMinDepth() — Sets the minimum depth a page must have to be included when rendering
- setRenderInvisible() — Render invisible items?
- setRole() — Sets ACL role(s) to use when iterating pages
- setServiceLocator() — Set the service locator.
- setTranslator() — Sets translator to use in helper
- setTranslatorEnabled() — Sets whether translator is enabled and should be used
- setTranslatorTextDomain() — Set translation text domain
- setUseAcl() — Sets whether ACL should be used
Inherited from Zend\View\Helper\AbstractHtmlElement
protected
- htmlAttribs() — Converts an associative array to a string of tag attributes.
- isXhtml() — Is doctype XHTML?
- normalizeId() — Normalize an ID
public
- getClosingBracket() — Get the tag closing bracket