RouterView

Extends RouterBase

View-based component routing class

abstract
since

3.5

package

Joomla CMS

Methods

__construct

Class constructor.

__construct(\Joomla\CMS\Application\CMSApplication app = null, \Joomla\CMS\Menu\AbstractMenu menu = null) : 
inherited
since

3.4

Arguments

app

CMSApplicationApplication-object that the router should use

menu

AbstractMenuMenu-object that the router should use

Response

mixed

attachRule

Attach a build rule

attachRule(\Joomla\CMS\Component\Router\Rules\RulesInterface rule) : 
since

3.5

Arguments

rule

RulesInterfaceThe function to be called.

Response

void

attachRules

Add a number of router rules to the object

attachRules(\Joomla\CMS\Component\Router\Rules\RulesInterface||string|int rules) : 
since

3.5

Arguments

rules

array<string|int, RulesInterface>Array of JComponentRouterRulesInterface objects

Response

void

build

Build method for URLs

build(mixed||string|int &query) : mixed||string|int
since

3.5

Arguments

query

array<string|int, mixed>Array of query elements

Response

array<string|int, mixed>Array of URL segments

detachRule

Remove a build rule

detachRule(\Joomla\CMS\Component\Router\Rules\RulesInterface rule) : 
since

3.5

Arguments

rule

RulesInterfaceThe rule to be removed.

Response

boolWas a rule removed?

getName

Method to return the name of the router

getName() : 
since

3.5

Response

stringName of the router

getPath

Get the path of views from target view to root view including content items of a nestable view

getPath(mixed||string|int query) : mixed||string|int
since

3.5

Arguments

query

array<string|int, mixed>Array of query elements

Response

array<string|int, mixed>List of views including IDs of content items

getRules

Get all currently attached rules

getRules() : \Joomla\CMS\Component\Router\Rules\RulesInterface||string|int
since

3.5

Response

array<string|int, RulesInterface>All currently attached rules in an array

getViews

Return an array of registered view objects

getViews() : \Joomla\CMS\Component\Router\RouterViewConfiguration||string|int
since

3.5

Response

array<string|int, RouterViewConfiguration>Array of registered view objects

parse

Parse method for URLs

parse(mixed||string|int &segments) : mixed||string|int
since

3.5

Arguments

segments

array<string|int, mixed>Array of URL string-segments

Response

array<string|int, mixed>Associative array of query values

preprocess

Generic method to preprocess a URL

preprocess(mixed||string|int query) : mixed||string|int
since

3.5

Arguments

query

array<string|int, mixed>An associative array of URL arguments

Response

array<string|int, mixed>The URL arguments to use to assemble the subsequent URL.

registerView

Register the views of a component

registerView(\Joomla\CMS\Component\Router\RouterViewConfiguration view) : 
since

3.5

Arguments

view

RouterViewConfigurationView configuration object

Response

void

Properties

app

Application object to use in the router

inherited
since

3.4

Type(s)

CMSApplication

menu

Menu object to use in the router

inherited
since

3.4

Type(s)

AbstractMenu

name

Name of the router of the component

since

3.5

Type(s)

string

rules

Array of rules

since

3.5

Type(s)

array<string|int, RulesInterface>

views

Views of the component

since

3.5

Type(s)

array<string|int, RouterViewConfiguration>