Zend\Navigation\Page\Mvc
Represents a page that is defined using controller, action, route name and route params to assemble the href
Synopsis
class Mvc
extends AbstractPage
{
- // members
- protected string $action;
- protected string $controller;
- protected array|string $query;
- protected array $params;
- protected string $route;
- protected string $hrefCache;
- protected RouteMatch $routeMatch;
- protected bool $useRouteMatch;
- protected RouteStackInterface $router;
- protected RouteStackInterface $defaultRouter;
- protected string $defaultRoute;
- // Inherited members from AbstractPage
- protected string|null $label;
- protected string|null $fragment;
- protected string|null $id;
- protected string|null $class;
- protected string|null $title;
- protected string|null $target;
- protected array $rel;
- protected array $rev;
- protected int|null $order;
- protected string|AclResource|null $resource;
- protected string|null $privilege;
- protected mixed|null $permission;
- protected string $textDomain;
- protected bool $active;
- protected bool $visible;
- protected AbstractContainer|null $parent;
- protected array $properties;
- protected array $factories;
- // Inherited members from AbstractContainer
- protected array $pages;
- protected array $index;
- protected bool $dirtyIndex;
- // methods
- public bool isActive()
- public string getHref()
- public Mvc setAction()
- public string|null getAction()
- public Mvc setController()
- public string|null getController()
- public self setQuery()
- public array|string|null getQuery()
- public Mvc setParams()
- public array getParams()
- public Mvc setRoute()
- public string getRoute()
- public RouteMatch getRouteMatch()
- public Mvc setRouteMatch()
- public bool useRouteMatch()
- public Mvc setUseRouteMatch()
- public null|RouteStackInterface getRouter()
- public Mvc setRouter()
- public static void setDefaultRouter()
- public static RouteStackInterface getDefaultRouter()
- public static void setDefaultRoute()
- public static string getDefaultRoute()
- public array toArray()
- // Inherited methods from AbstractPage
- public static AbstractPage factory()
- public static void addFactory()
- public void __construct()
- protected void init()
- public AbstractPage setOptions()
- public AbstractPage setLabel()
- public string getLabel()
- public AbstractPage setFragment()
- public string|null getFragment()
- public AbstractPage setId()
- public string|null getId()
- public AbstractPage setClass()
- public string|null getClass()
- public AbstractPage setTitle()
- public string|null getTitle()
- public AbstractPage setTarget()
- public string|null getTarget()
- public AbstractPage setRel()
- public array getRel()
- public AbstractPage setRev()
- public array getRev()
- public AbstractPage setOrder()
- public int|null getOrder()
- public AbstractPage setResource()
- public string|AclResource|null getResource()
- public AbstractPage setPrivilege()
- public string|null getPrivilege()
- public AbstractPage setPermission()
- public mixed|null getPermission()
- public AbstractPage setTextDomain()
- public mixed|null getTextDomain()
- public AbstractPage setActive()
- public bool isActive()
- public bool getActive()
- public AbstractPage setVisible()
- public bool isVisible()
- public bool getVisible()
- public AbstractPage setParent()
- public AbstractContainer|null getParent()
- public AbstractPage set()
- public mixed get()
- public void __set()
- public mixed __get()
- public bool __isset()
- public void __unset()
- public string __toString()
- public AbstractPage addRel()
- public AbstractPage addRev()
- public AbstractPage removeRel()
- public AbstractPage removeRev()
- public array getDefinedRel()
- public array getDefinedRev()
- public array getCustomProperties()
- public final string hashCode()
- public array toArray()
- protected static string normalizePropertyName()
- public abstract string getHref()
- // 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
- $action
—
string
Action name to use when assembling URL - $active
—
Zend\Navigation\Page\bool
Whether this page should be considered active - $class
—
Zend\Navigation\Page\string|null
Style class for this page (CSS) - $controller
—
string
Controller name to use when assembling URL - $defaultRoute
—
string
Default route name - $defaultRouter
—
Zend\Mvc\Router\RouteStackInterface
Default router to be used if router is not given. - $dirtyIndex
—
Zend\Navigation\bool
Whether index is dirty and needs to be re-arranged - $factories
—
array
Static factories list for factory pages - $fragment
—
Zend\Navigation\Page\string|null
Fragment identifier (anchor identifier) - $hrefCache
—
string
Cached href - $id
—
Zend\Navigation\Page\string|null
Page id - $index
—
array
An index that contains the order in which to iterate pages - $label
—
Zend\Navigation\Page\string|null
Page label - $order
—
Zend\Navigation\Page\int|null
Page order used by parent container - $pages
—
array
Contains sub pages - $params
—
array
Params to use when assembling URL - $parent
—
\Zend\Navigation\AbstractContainer|null
Parent container - $permission
—
Zend\Navigation\Page\mixed|null
Permission associated with this page - $privilege
—
Zend\Navigation\Page\string|null
ACL privilege associated with this page - $properties
—
array
Custom page properties, used by __set(), __get() and __isset() - $query
—
Zend\Navigation\Page\array|string
URL query part to use when assembling URL - $rel
—
array
Forward links to other pages - $resource
—
Zend\Navigation\Page\string|AclResource|null
ACL resource associated with this page - $rev
—
array
Reverse links to other pages - $route
—
string
RouteInterface name to use when assembling URL - $routeMatch
—
Zend\Mvc\Router\RouteMatch
RouteInterface matches; used for routing parameters and testing validity - $router
—
Zend\Mvc\Router\RouteStackInterface
Router for assembling URLs - $target
—
Zend\Navigation\Page\string|null
This page's target - $textDomain
—
string
Text domain for Translator - $title
—
Zend\Navigation\Page\string|null
A more descriptive title for this page - $useRouteMatch
—
Zend\Navigation\Page\bool
If true and set routeMatch than getHref will use routeMatch params to assemble uri - $visible
—
Zend\Navigation\Page\bool
Whether this page should be considered visible
Methods
public
- getAction() — Returns action name to use when assembling URL
- getController() — Returns controller name to use when assembling URL
- getDefaultRoute() — Get default route name
- getDefaultRouter() — Gets the default router for assembling URLs.
- getHref() — Returns href for this page
- getParams() — Returns params to use when assembling URL
- getQuery() — Returns URL query part to use when assembling URL
- getRoute() — Returns route name to use when assembling URL
- getRouteMatch() — Get the route match.
- getRouter() — Get the router.
- isActive() — Returns whether page should be considered active or not
- setAction() — Sets action name to use when assembling URL
- setController() — Sets controller name to use when assembling URL
- setDefaultRoute() — Set default route name
- setDefaultRouter() — Sets the default router for assembling URLs.
- setParams() — Sets params to use when assembling URL
- setQuery() — Sets URL query part to use when assembling URL
- setRoute() — Sets route name to use when assembling URL
- setRouteMatch() — Set route match object from which parameters will be retrieved
- setRouter() — Sets router for assembling URLs
- setUseRouteMatch() — Set whether the page should use route match params for assembling link uri
- toArray() — Returns an array representation of the page
- useRouteMatch() — Get the useRouteMatch flag
Inherited from Zend\Navigation\Page\AbstractPage
protected
- init() — Initializes page (used by subclasses)
- normalizePropertyName() — Normalizes a property name
public
- __get() — Returns a property, or null if it doesn't exist
- __isset() — Checks if a property is set
- __set() — Sets a custom property
- __toString() — Returns page label
- __unset() — Unsets the given custom property
- addFactory() — Add static factory for self::factory function
- addRel() — Adds a forward relation to the page
- addRev() — Adds a reverse relation to the page
- factory() — Factory for Zend\Navigation\Page classes
- get() — Returns the value of the given property
- getActive() — Proxy to isActive()
- getClass() — Returns page class (CSS)
- getCustomProperties() — Returns custom properties as an array
- getDefinedRel() — Returns an array containing the defined forward relations
- getDefinedRev() — Returns an array containing the defined reverse relations
- getFragment() — Returns fragment identifier
- getHref() — Returns href for this page
- getId() — Returns page id
- getLabel() — Returns page label
- getOrder() — Returns page order used in parent container
- getParent() — Returns parent container
- getPermission() — Returns permission associated with this page
- getPrivilege() — Returns ACL privilege associated with this page
- getRel() — Returns the page's forward links to other pages
- getResource() — Returns ACL resource associated with this page
- getRev() — Returns the page's reverse links to other pages
- getTarget() — Returns page target
- getTextDomain() — Returns text domain for translation
- getTitle() — Returns page title
- getVisible() — Proxy to isVisible()
- hashCode() — Returns a hash code value for the page
- isActive() — Returns whether page should be considered active or not
- isVisible() — Returns a boolean value indicating whether the page is visible
- removeRel() — Removes a forward relation from the page
- removeRev() — Removes a reverse relation from the page
- set() — Sets the given property
- setActive() — Sets whether page should be considered active or not
- setClass() — Sets page CSS class
- setFragment() — Sets a fragment identifier
- setId() — Sets page id
- setLabel() — Sets page label
- setOptions() — Sets page properties using options from an associative array
- setOrder() — Sets page order to use in parent container
- setParent() — Sets parent container
- setPermission() — Sets permission associated with this page
- setPrivilege() — Sets ACL privilege associated with this page
- setRel() — Sets the page's forward links to other pages
- setResource() — Sets ACL resource associated with this page
- setRev() — Sets the page's reverse links to other pages
- setTarget() — Sets page target
- setTextDomain() — Sets text domain for translation
- setTitle() — Sets page title
- setVisible() — Sets whether the page should be visible or not
- toArray() — Returns an array representation of the page
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