Zend\Navigation\Navigation
A simple container class for {@link Zend\Navigation\Page} pages
Synopsis
class Navigation
extends AbstractContainer
{
- // Inherited members from AbstractContainer
- protected array $pages;
- protected array $index;
- protected bool $dirtyIndex;
- // methods
- public void __construct()
- // Inherited methods from AbstractContainer
- protected void sort()
- public void notifyOrderUpdated()
- public self addPage()
- public self addPages()
- public self setPages()
- public array getPages()
- public bool removePage()
- public self removePages()
- public bool hasPage()
- public bool hasPages()
- public AbstractPage|null findOneBy()
- public array findAllBy()
- public AbstractPage|null findBy()
- public void __call()
- public array toArray()
- public AbstractPage current()
- public string key()
- public void next()
- public void rewind()
- public bool valid()
- public bool hasChildren()
- public AbstractPage|null getChildren()
- public int count()
Hierarchy
Members
protected
- $dirtyIndex
—
Zend\Navigation\bool
Whether index is dirty and needs to be re-arranged - $index
—
array
An index that contains the order in which to iterate pages - $pages
—
array
Contains sub pages
Methods
Inherited from Zend\Navigation\AbstractContainer
protected
- sort() — Sorts the page index according to page order
public
- __call() — Magic overload: Proxy calls to finder methods
- addPage() — Adds a page to the container
- addPages() — Adds several pages at once
- count() — Returns number of pages in container
- current() — Returns current page
- findAllBy() — Returns all child pages matching $property == $value, or an empty array if no pages are found
- findBy() — Returns page(s) matching $property == $value
- findOneBy() — Returns a child page matching $property == $value, or null if not found
- getChildren() — Returns the child container.
- getPages() — Returns pages in the container
- hasChildren() — Proxy to hasPages()
- hasPage() — Checks if the container has the given page
- hasPages() — Returns true if container contains any pages
- key() — Returns hash code of current page
- next() — Moves index pointer to next page in the container
- notifyOrderUpdated() — Notifies container that the order of pages are updated
- removePage() — Removes the given page from the container
- removePages() — Removes all pages in container
- rewind() — Sets index pointer to first page in the container
- setPages() — Sets pages this container should have, removing existing pages
- toArray() — Returns an array representation of all pages in container
- valid() — Checks if container index is valid