You are here

public function MigrateController::showLog in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal_ui/src/Controller/MigrateController.php \Drupal\migrate_drupal_ui\Controller\MigrateController::showLog()

Sets a log filter and redirects to the log.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse A redirect response object that may be returned by the controller.

1 string reference to 'MigrateController::showLog'
migrate_drupal_ui.routing.yml in core/modules/migrate_drupal_ui/migrate_drupal_ui.routing.yml
core/modules/migrate_drupal_ui/migrate_drupal_ui.routing.yml

File

core/modules/migrate_drupal_ui/src/Controller/MigrateController.php, line 22

Class

MigrateController
Provides controller methods for the migration.

Namespace

Drupal\migrate_drupal_ui\Controller

Code

public function showLog(Request $request) {

  // Sets both the session and the query parameter so that it works correctly
  // with both the watchdog view and the fallback.
  $request
    ->getSession()
    ->set('dblog_overview_filter', [
    'type' => [
      'migrate_drupal_ui' => 'migrate_drupal_ui',
    ],
  ]);
  return $this
    ->redirect('dblog.overview', [], [
    'query' => [
      'type' => [
        'migrate_drupal_ui',
      ],
    ],
  ]);
}