Drupal 8  8.0.2
CurrentRouteMatch Class Reference
Inheritance diagram for CurrentRouteMatch:

Public Member Functions

 __construct (RequestStack $request_stack)
 
 getRouteName ()
 
 getRouteObject ()
 
 getParameter ($parameter_name)
 
 getParameters ()
 
 getRawParameter ($parameter_name)
 
 getRawParameters ()
 
 getCurrentRouteMatch ()
 
 getMasterRouteMatch ()
 
 getParentRouteMatch ()
 
 getRouteMatchFromRequest (Request $request)
 

Protected Member Functions

 getRouteMatch (Request $request)
 

Protected Attributes

 $requestStack
 
 $routeMatches
 

Detailed Description

Default object for current_route_match service.

Constructor & Destructor Documentation

__construct ( RequestStack  $request_stack)

Constructs a CurrentRouteMatch object.

Parameters
\Symfony\Component\HttpFoundation\RequestStack$request_stackThe request stack.

References Drupal\requestStack().

Here is the call graph for this function:

Member Function Documentation

getCurrentRouteMatch ( )

Returns the route match for the current request.

Returns
The current route match object.

Implements StackedRouteMatchInterface.

References CurrentRouteMatch\getRouteMatch(), and Drupal\requestStack().

Referenced by CurrentRouteMatch\getParameter(), CurrentRouteMatch\getParameters(), CurrentRouteMatch\getRawParameter(), CurrentRouteMatch\getRawParameters(), CurrentRouteMatch\getRouteName(), and CurrentRouteMatch\getRouteObject().

Here is the call graph for this function:

Here is the caller graph for this function:

getMasterRouteMatch ( )

{Gets the master route match..

Returns
}

Implements StackedRouteMatchInterface.

References CurrentRouteMatch\getRouteMatch(), and Drupal\requestStack().

Here is the call graph for this function:

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()
}

Implements RouteMatchInterface.

References CurrentRouteMatch\getCurrentRouteMatch().

Here is the call 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()
}

Implements RouteMatchInterface.

References CurrentRouteMatch\getCurrentRouteMatch().

Here is the call graph for this function:

getParentRouteMatch ( )

{Returns the parent route match of the current.

Returns
|NULL The parent route match or NULL, if it the master route match.
}

Implements StackedRouteMatchInterface.

References CurrentRouteMatch\getRouteMatch(), and Drupal\requestStack().

Here is the call 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()
}

Implements RouteMatchInterface.

References CurrentRouteMatch\getCurrentRouteMatch().

Here is the call graph for this function:

getRawParameters ( )

{Returns the bag of all raw route parameters.

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

Implements RouteMatchInterface.

References CurrentRouteMatch\getCurrentRouteMatch().

Here is the call graph for this function:

getRouteMatch ( Request  $request)
protected

Returns the route match for a passed in request.

Parameters
\Symfony\Component\HttpFoundation\Request$requestA request object.
Returns
A route match object created from the request.

References RouteMatch\createFromRequest().

Referenced by CurrentRouteMatch\getCurrentRouteMatch(), CurrentRouteMatch\getMasterRouteMatch(), CurrentRouteMatch\getParentRouteMatch(), and CurrentRouteMatch\getRouteMatchFromRequest().

Here is the call graph for this function:

Here is the caller graph for this function:

getRouteMatchFromRequest ( Request  $request)

{Returns a route match from a given request, if possible.

Parameters
\Symfony\Component\HttpFoundation\RequestThe request.
Returns
|NULL THe matching route match, or NULL if there is no matching one.
}

Implements StackedRouteMatchInterface.

References CurrentRouteMatch\getRouteMatch().

Here is the call graph for this function:

getRouteName ( )

{Returns the route name.

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

Implements RouteMatchInterface.

References CurrentRouteMatch\getCurrentRouteMatch().

Here is the call graph for this function:

getRouteObject ( )

{Returns the route object.

Returns
|null The route object. NULL if no route is matched.
}

Implements RouteMatchInterface.

References CurrentRouteMatch\getCurrentRouteMatch().

Here is the call graph for this function:


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