Commit ef1c0336 authored by TravisCarden's avatar TravisCarden

By TravisCarden: Converted path-based redirects per #2316687.

parent 66755505
......@@ -83,6 +83,6 @@ class ChecklistapiChecklistClearForm extends ConfirmFormBase {
$form['#checklist']->clearSavedProgress();
// Redirect back to checklist.
$form_state['redirect'] = $form['#checklist']->path;
$form_state->setRedirect($form['#checklist']->getRouteName());
}
}
......@@ -192,11 +192,11 @@ class ChecklistapiChecklistForm implements FormInterface {
*
* @param array $form
* An associative array containing the structure of the form.
* @param array $form_state
* A reference to a keyed array containing the current state of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*/
public function clear(array $form, array &$form_state) {
$form_state['redirect_route']['route_name'] = $form['#checklist']->getRouteName() . '.clear';
public function clear(array &$form, FormStateInterface $form_state) {
$form_state->setRedirect($form['#checklist']->getRouteName() . '.clear');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment