Drupal 8  8.0.2
RouteMatchInterface Interface Reference
Inheritance diagram for RouteMatchInterface:

Public Member Functions

 getRouteName ()
 
 getRouteObject ()
 
 getParameter ($parameter_name)
 
 getParameters ()
 
 getRawParameter ($parameter_name)
 
 getRawParameters ()
 

Detailed Description

Provides an interface for classes representing the result of routing.

Routing is the process of selecting the best matching candidate from a collection of routes for an incoming request. The relevant properties of a request include the path as well as a list of raw parameter values derived from the URL. If an appropriate route is found, raw parameter values will be upcast automatically if possible.

The route match object contains useful information about the selected route as well as the raw and upcast parameters derived from the incoming request.

Member Function Documentation

getParameter (   $parameter_name)

Returns the processed value of a named route parameter.

Raw URL parameters are processed by the parameter conversion system, which does operations such as converting entity ID parameters to fully-loaded entities. For example, the path node/12345 would have a raw node ID parameter value of 12345, while the processed parameter value would be the corresponding loaded node object.

Parameters
string$parameter_nameThe parameter name.
Returns
mixed|null The parameter value. NULL if the route doesn't define the parameter or if the parameter value can't be determined from the request.
See Also
::getRawParameter()

Implemented in RouteMatch, CurrentRouteMatch, and NullRouteMatch.

Referenced by ContentTranslationOverviewAccess\access(), ContentTranslationManageAccessCheck\access(), ContentTranslationController\add(), ForumListingBreadcrumbBuilder\applies(), ForumNodeBreadcrumbBuilder\applies(), TestThemeNegotiator\applies(), TermBreadcrumbBuilder\applies(), BookBreadcrumbBuilder\applies(), ForumNodeBreadcrumbBuilder\build(), TermBreadcrumbBuilder\build(), BookBreadcrumbBuilder\build(), AdminDemoNegotiator\determineActiveTheme(), TestThemeNegotiator\determineActiveTheme(), ContentTranslationController\edit(), EntityForm\getEntityFromRouteMatch(), BlockContentAddLocalAction\getOptions(), ConfigEntityMapper\populateFromRouteMatch(), ConfigNamesMapper\populateFromRouteMatch(), and RouteMatchTestBase\testGetParameter().

Here is the caller graph for this function:

getParameters ( )

Returns the bag of all processed route parameters.

Raw URL parameters are processed by the parameter conversion system, which does operations such as converting entity ID parameters to fully-loaded entities. For example, the path node/12345 would have a raw node ID parameter value of 12345, while the processed parameter value would be the corresponding loaded node object.

Returns
The parameter bag.
See Also
::getRawParameters()

Implemented in RouteMatch, CurrentRouteMatch, and NullRouteMatch.

Referenced by EntityAccessCheck\access(), EntityController\doGetEntity(), AccessArgumentsResolverFactory\getArgumentsResolver(), EntityDisplayFormBase\getEntityFromRouteMatch(), RequestHandler\handle(), and RouteMatchTestBase\testGetParameters().

Here is the caller graph for this function:

getRawParameter (   $parameter_name)

Returns the raw value of a named route parameter.

Parameters
string$parameter_nameThe parameter name.
Returns
string|null The raw (non-upcast) parameter value. NULL if the route doesn't define the parameter or if the raw parameter value can't be determined from the request.
See Also
::getParameter()

Implemented in RouteMatch, CurrentRouteMatch, and NullRouteMatch.

Referenced by FormModeAccessCheck\access(), ViewModeAccessCheck\access(), FieldStorageConfigEditForm\getEntityFromRouteMatch(), EntityForm\getEntityFromRouteMatch(), LocalTaskDefault\getRouteParameters(), LocalActionDefault\getRouteParameters(), and RouteMatchTestBase\testGetRawParameter().

Here is the caller graph for this function:

getRawParameters ( )

Returns the bag of all raw route parameters.

Returns
The parameter bag.
See Also
::getParameters()

Implemented in RouteMatch, CurrentRouteMatch, and NullRouteMatch.

Referenced by CsrfAccessCheck\access(), EntityCreateAccessCheck\access(), Url\fromRouteMatch(), AccessArgumentsResolverFactory\getArgumentsResolver(), LocalTaskDefault\getRouteParameters(), LocalActionDefault\getRouteParameters(), and RouteMatchTestBase\testGetRawParameters().

Here is the caller graph for this function:

getRouteName ( )

Returns the route name.

Returns
string|null The route name. NULL if no route is matched.

Implemented in RouteMatch, CurrentRouteMatch, and NullRouteMatch.

Referenced by AdminDemoNegotiator\applies(), ForumListingBreadcrumbBuilder\applies(), ForumNodeBreadcrumbBuilder\applies(), HighPriorityThemeNegotiator\applies(), TermBreadcrumbBuilder\applies(), DialogRenderer\determineTargetSelector(), Url\fromRouteMatch(), BlockContentAddLocalAction\getOptions(), and RouteMatchTestBase\testGetRouteName().

Here is the caller graph for this function:


The documentation for this interface was generated from the following file: