Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

\Drupal\Core\Form\ConfirmFormBase is the Drupal 8 equivalent of confirm_form(). See the change notice for that conversion here: confirm_form() deprecated in favor of \Drupal\Core\Form\ConfirmFormBase

Instead of specifying the path to return to when the "Cancel" button is clicked, you now specify the route name, and optionally, any route parameters or options.

<?php
 
public function getCancelRoute() {
    return array(
     
'route_name' => 'system_admin',
     
'options' => array(
       
'query' => array(
         
'destination' => 'admin/config',
        ),
      ),
    );
  }
?>
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done