You are here

public static function Drupal::routeMatch in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal.php \Drupal::routeMatch()
  2. 9 core/lib/Drupal.php \Drupal::routeMatch()

Retrieves the currently active route match object.

Return value

\Drupal\Core\Routing\RouteMatchInterface The currently active route match object.

30 calls to Drupal::routeMatch()
BatchUserAction::processBatch in core/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php
Processes the batch item.
batch_process in core/includes/form.inc
Processes the batch.
big_pipe_page_attachments in core/modules/big_pipe/big_pipe.module
Implements hook_page_attachments().
block_page_top in core/modules/block/block.module
Implements hook_page_top().
comment_form_field_ui_display_overview_form_alter in core/modules/comment/comment.module
Implements hook_form_FORM_ID_alter().

... See full list

File

core/lib/Drupal.php, line 276

Class

Drupal
Static Service Container wrapper.

Code

public static function routeMatch() {
  return static::getContainer()
    ->get('current_route_match');
}