diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/NodeBulkForm.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/NodeBulkForm.php index 418610a84254abd218744d6ba815592e0cd0d251..1fcd4cddd3c03ea7f3e8f33743d6f0e358714a70 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/NodeBulkForm.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/NodeBulkForm.php @@ -34,7 +34,7 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi /** * {@inheritdoc} */ - public function views_form_validate(&$form, &$form_state) { + public function viewsFormValidate(&$form, &$form_state) { $selected = array_filter($form_state['values'][$this->options['id']]); if (empty($selected)) { form_set_error('', $form_state, t('No items selected.')); @@ -44,8 +44,8 @@ public function views_form_validate(&$form, &$form_state) { /** * {@inheritdoc} */ - public function views_form_submit(&$form, &$form_state) { - parent::views_form_submit($form, $form_state); + public function viewsFormSubmit(&$form, &$form_state) { + parent::viewsFormSubmit($form, $form_state); if ($form_state['step'] == 'views_form_views_form') { Cache::invalidateTags(array('content' => TRUE)); } diff --git a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php index a14e0599f6d8210acb95a9d40c83ff47c71ebaa7..ceee2e2046d73ff6bad5ea63c2a05b1ac6403f4d 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php +++ b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php @@ -105,7 +105,7 @@ public function preRender(&$values) { * @param array $form_state * An associative array containing the current state of the form. */ - public function views_form(&$form, &$form_state) { + public function viewsForm(&$form, &$form_state) { // Add the tableselect javascript. $form['#attached']['library'][] = array('system', 'drupal.tableselect'); @@ -173,7 +173,7 @@ protected function getBulkOptions() { * @param array $form_state * An associative array containing the current state of the form. */ - public function views_form_submit(&$form, &$form_state) { + public function viewsFormSubmit(&$form, &$form_state) { if ($form_state['step'] == 'views_form_views_form') { // Filter only selected checkboxes. $selected = array_filter($form_state['values'][$this->options['id']]); diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/UserBulkForm.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/UserBulkForm.php index 5aac6985dab4d5c15464a62da7cc1a9b79ae0790..ea6d67a2fd89fb8156601c4ade4493af672f3a6d 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/field/UserBulkForm.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/UserBulkForm.php @@ -38,8 +38,8 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi * * Provide a more useful title to improve the accessibility. */ - public function views_form(&$form, &$form_state) { - parent::views_form($form, $form_state); + public function viewsForm(&$form, &$form_state) { + parent::viewsForm($form, $form_state); if (!empty($this->view->result)) { foreach ($this->view->result as $row_index => $result) { @@ -54,7 +54,7 @@ public function views_form(&$form, &$form_state) { /** * {@inheritdoc} */ - public function views_form_validate(&$form, &$form_state) { + public function viewsFormValidate(&$form, &$form_state) { $selected = array_filter($form_state['values'][$this->options['id']]); if (empty($selected)) { form_set_error('', $form_state, t('No users selected.')); diff --git a/core/modules/views/lib/Drupal/views/Form/ViewsFormMainForm.php b/core/modules/views/lib/Drupal/views/Form/ViewsFormMainForm.php index a5dbd1538a545e7629281782815eb3818c312bfb..98cdc4f97f7ac45f0c3ddaf88819428cb3fe194c 100644 --- a/core/modules/views/lib/Drupal/views/Form/ViewsFormMainForm.php +++ b/core/modules/views/lib/Drupal/views/Form/ViewsFormMainForm.php @@ -62,8 +62,8 @@ public function buildForm(array $form, array &$form_state, ViewExecutable $view $callback($view, $field, $form, $form_state); $has_form = TRUE; } - elseif (method_exists($field, 'views_form')) { - $field->views_form($form, $form_state); + elseif (method_exists($field, 'viewsForm')) { + $field->viewsForm($form, $form_state); $has_form = TRUE; } @@ -90,8 +90,8 @@ public function buildForm(array $form, array &$form_state, ViewExecutable $view $area_handlers = array_merge(array_values($view->header), array_values($view->footer)); $empty = empty($view->result); foreach ($area_handlers as $area) { - if (method_exists($area, 'views_form') && !$area->views_form_empty($empty)) { - $area->views_form($form, $form_state); + if (method_exists($area, 'viewsForm') && !$area->viewsFormEmpty($empty)) { + $area->viewsForm($form, $form_state); } } @@ -111,16 +111,16 @@ public function validateForm(array &$form, array &$form_state) { // Call the validation method on every field handler that has it. foreach ($view->field as $field) { - if (method_exists($field, 'views_form_validate')) { - $field->views_form_validate($form, $form_state); + if (method_exists($field, 'viewsFormValidate')) { + $field->viewsFormValidate($form, $form_state); } } // Call the validate method on every area handler that has it. foreach (array('header', 'footer') as $area) { foreach ($view->{$area} as $area_handler) { - if (method_exists($area_handler, 'views_form_validate')) { - $area_handler->views_form_validate($form, $form_state); + if (method_exists($area_handler, 'viewsFormValidate')) { + $area_handler->viewsFormValidate($form, $form_state); } } } @@ -134,16 +134,16 @@ public function submitForm(array &$form, array &$form_state) { // Call the submit method on every field handler that has it. foreach ($view->field as $field) { - if (method_exists($field, 'views_form_submit')) { - $field->views_form_submit($form, $form_state); + if (method_exists($field, 'viewsFormSubmit')) { + $field->viewsFormSubmit($form, $form_state); } } // Call the submit method on every area handler that has it. foreach (array('header', 'footer') as $area) { foreach ($view->{$area} as $area_handler) { - if (method_exists($area_handler, 'views_form_submit')) { - $area_handler->views_form_submit($form, $form_state); + if (method_exists($area_handler, 'viewsFormSubmit')) { + $area_handler->viewsFormSubmit($form, $form_state); } } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/ActionBulkForm.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/ActionBulkForm.php index ba2356c825bdb9c1bd3cdc2c20e7e9433b0a4c15..a6eef9054779f05072b9da84c422497edbf9e925 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/ActionBulkForm.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/ActionBulkForm.php @@ -98,10 +98,10 @@ protected function getBulkOptions($filtered = TRUE) { } /** - * Implements \Drupal\system\Plugin\views\field\BulkFormBase::views_form_submit(). + * Implements \Drupal\system\Plugin\views\field\BulkFormBase::viewsFormSubmit(). */ - public function views_form_submit(&$form, &$form_state) { - parent::views_form_submit($form, $form_state); + public function viewsFormSubmit(&$form, &$form_state) { + parent::viewsFormSubmit($form, $form_state); if ($form_state['step'] == 'views_form_views_form') { $count = count(array_filter($form_state['values'][$this->options['id']])); $action = $this->actions[$form_state['values']['action']]; diff --git a/core/modules/views/views.module b/core/modules/views/views.module index c33ab873dcea8ba4bef419248185339e4a75a5c1..7954af0a27ac1ffd62f0f32ea02677a5333c8200 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -990,14 +990,14 @@ function views_get_view($name) { */ function views_view_has_form_elements($view) { foreach ($view->field as $field) { - if (property_exists($field, 'views_form_callback') || method_exists($field, 'views_form')) { + if (property_exists($field, 'views_form_callback') || method_exists($field, 'viewsForm')) { return TRUE; } } $area_handlers = array_merge(array_values($view->header), array_values($view->footer)); $empty = empty($view->result); foreach ($area_handlers as $area) { - if (method_exists($area, 'views_form') && !$area->views_form_empty($empty)) { + if (method_exists($area, 'viewsForm') && !$area->viewsFormEmpty($empty)) { return TRUE; } }