RouterView
Extends \Joomla\CMS\Component\Router\RouterBaseView-based component routing class
since |
3.5 |
---|
Methods
__construct
Class constructor.
__construct(\JApplicationCms $app = null, \JMenu $menu = null)
since |
3.4 |
---|
Arguments
- $app
\JApplicationCms
Application-object that the router should use- $menu
\JMenu
Menu-object that the router should use
attachRule
Attach a build rule
attachRule(\Joomla\CMS\Component\Router\Rules\RulesInterface $rule) : void
since |
3.5 |
---|
Arguments
- $rule
\Joomla\CMS\Component\Router\Rules\RulesInterface
The function to be called.
attachRules
Add a number of router rules to the object
attachRules(array<mixed,\Joomla\CMS\Component\Router\Rules\RulesInterface> $rules) : void
since |
3.5 |
---|
Arguments
- $rules
array<mixed,\Joomla\CMS\Component\Router\Rules\RulesInterface>
Array of JComponentRouterRulesInterface objects
build
Build method for URLs
build( &$query) : array
since |
3.5 |
---|
Arguments
- $query
Response
array
Array of URL segments
detachRule
Remove a build rule
detachRule(\Joomla\CMS\Component\Router\Rules\RulesInterface $rule) : boolean
since |
3.5 |
---|
Arguments
- $rule
\Joomla\CMS\Component\Router\Rules\RulesInterface
The rule to be removed.
Response
boolean
Was a rule removed?
getName
Method to return the name of the router
getName() : string
since |
3.5 |
---|
Response
string
Name of the router
getPath
Get the path of views from target view to root view including content items of a nestable view
getPath(array $query) : array
since |
3.5 |
---|
Arguments
- $query
array
Array of query elements
Response
array
List of views including IDs of content items
getRules
Get all currently attached rules
getRules() : array<mixed,\Joomla\CMS\Component\Router\Rules\RulesInterface>
since |
3.5 |
---|
Response
array<mixed,\Joomla\CMS\Component\Router\Rules\RulesInterface>
All currently attached rules in an array
getViews
Return an array of registered view objects
getViews() : array<mixed,\Joomla\CMS\Component\Router\RouterViewConfiguration>
since |
3.5 |
---|
Response
array<mixed,\Joomla\CMS\Component\Router\RouterViewConfiguration>
Array of registered view objects
parse
Parse method for URLs
parse( &$segments) : array
since |
3.5 |
---|
Arguments
- $segments
Response
array
Associative array of query values
preprocess
Generic method to preprocess a URL
preprocess(array $query) : array
For example it can add the Itemid or set a language parameter. This method is executed on each URL, regardless of SEF mode switched on or not.
since |
3.3 |
---|
Arguments
- $query
array
An associative array of URL arguments
Response
array
The URL arguments to use to assemble the subsequent URL.
registerView
Register the views of a component
registerView(\Joomla\CMS\Component\Router\RouterViewConfiguration $view) : void
since |
3.5 |
---|
Arguments
- $view
\Joomla\CMS\Component\Router\RouterViewConfiguration
View configuration object
Properties
name
Name of the router of the component
since |
3.5 |
---|
Type(s)
string
rules
Array of rules
views
Views of the component
app
Application object to use in the router
since |
3.4 |
---|
Type(s)
\JApplicationCms