From 26e5965293d96493e71e61eb3498d364ba0829eb Mon Sep 17 00:00:00 2001 From: catch Date: Sat, 6 Apr 2013 22:46:47 +0100 Subject: [PATCH] Issue #1946452 by splatio: Convert confirm_form() in search.admin.inc to the new form interface. --- .../lib/Drupal/search/Form/ReindexConfirm.php | 70 +++++++++++++++++++ core/modules/search/search.admin.inc | 23 ------ core/modules/search/search.module | 5 +- core/modules/search/search.routing.yml | 6 ++ 4 files changed, 77 insertions(+), 27 deletions(-) create mode 100644 core/modules/search/lib/Drupal/search/Form/ReindexConfirm.php create mode 100644 core/modules/search/search.routing.yml diff --git a/core/modules/search/lib/Drupal/search/Form/ReindexConfirm.php b/core/modules/search/lib/Drupal/search/Form/ReindexConfirm.php new file mode 100644 index 00000000000..0984b0bf5e0 --- /dev/null +++ b/core/modules/search/lib/Drupal/search/Form/ReindexConfirm.php @@ -0,0 +1,70 @@ + 'Clear index', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('search_reindex_confirm'), - 'access arguments' => array('administer search'), + 'route_name' => 'search_reindex_confirm', 'type' => MENU_VISIBLE_IN_BREADCRUMB, - 'file' => 'search.admin.inc', ); // Add paths for searching. We add each module search path twice: once without diff --git a/core/modules/search/search.routing.yml b/core/modules/search/search.routing.yml new file mode 100644 index 00000000000..5521e187a11 --- /dev/null +++ b/core/modules/search/search.routing.yml @@ -0,0 +1,6 @@ +search_reindex_confirm: + pattern: '/admin/config/search/settings/reindex' + defaults: + _form: 'Drupal\search\Form\ReindexConfirm' + requirements: + _permission: 'administer search'