diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index edca31587916d869db6ad194e3726e7189825fa0..511d72ef2b2172a9eea7fe3fc7fa59ce9c2798b8 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -8,19 +8,6 @@ use Drupal\views\Analyzer; use Drupal\views\ViewExecutable; -/** - * Implements hook_views_data_alter(). - */ -function node_views_data_alter(&$data) { - $data['node']['node_bulk_form'] = array( - 'title' => t('Node operations bulk form'), - 'help' => t('Add a form element that lets you run operations on multiple nodes.'), - 'field' => array( - 'id' => 'node_bulk_form', - ), - ); -} - /** * Implements hook_views_wizard(). */ diff --git a/core/modules/node/src/NodeViewsData.php b/core/modules/node/src/NodeViewsData.php index b3df204d0aef3f23d5cc0924d652c04d4079c2fa..ca2bb2677ed2a881744e6708fe72f18a423dc45f 100644 --- a/core/modules/node/src/NodeViewsData.php +++ b/core/modules/node/src/NodeViewsData.php @@ -115,6 +115,14 @@ public function getViewsData() { ), ); + $data['node']['node_bulk_form'] = array( + 'title' => t('Node operations bulk form'), + 'help' => t('Add a form element that lets you run operations on multiple nodes.'), + 'field' => array( + 'id' => 'node_bulk_form', + ), + ); + // Bogus fields for aliasing purposes. // @todo Add similar support to any date field diff --git a/core/modules/user/src/UserViewsData.php b/core/modules/user/src/UserViewsData.php index 04b1b976343b8b23fc1eb381ad1fdc86eae8683e..acf21009b7381314e78d6eb8f7879f284b46f5ae 100644 --- a/core/modules/user/src/UserViewsData.php +++ b/core/modules/user/src/UserViewsData.php @@ -277,6 +277,14 @@ public function getViewsData() { ), ); + $data['users']['user_bulk_form'] = array( + 'title' => t('Bulk update'), + 'help' => t('Add a form element that lets you run operations on multiple users.'), + 'field' => array( + 'id' => 'user_bulk_form', + ), + ); + $data['user__roles']['table']['group'] = t('User'); $data['user__roles']['table']['join'] = array( diff --git a/core/modules/user/user.views.inc b/core/modules/user/user.views.inc index 3f1f9c01ed7ca6604b61812137f9240afcb340ca..5e3bd251e02cf242fb0ee1aa3a9757c15b757468 100644 --- a/core/modules/user/user.views.inc +++ b/core/modules/user/user.views.inc @@ -5,19 +5,6 @@ * Provide views data for user.module. */ -/** - * Implements hook_views_data_alter(). - */ -function user_views_data_alter(&$data) { - $data['users']['user_bulk_form'] = array( - 'title' => t('Bulk update'), - 'help' => t('Add a form element that lets you run operations on multiple users.'), - 'field' => array( - 'id' => 'user_bulk_form', - ), - ); -} - /** * Implements hook_views_plugins_argument_validator_alter(). */