diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 4da5800..a13d679 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -2531,11 +2531,11 @@ public function preExecute() { $this->view->initHandlers(); if ($this->usesExposed()) { $exposed_form = $this->getPlugin('exposed_form'); - $exposed_form->pre_execute(); + $exposed_form->preExecute(); } foreach ($this->extender as $extender) { - $extender->pre_execute(); + $extender->preExecute(); } $this->view->setShowAdminLinks($this->getOption('show_admin_links')); diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php index 02e030e..de7dc8b 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php @@ -41,7 +41,7 @@ public function submitOptionsForm(&$form, &$form_state) { } /** * Set up any variables on the view prior to execution. */ - public function pre_execute() { } + public function preExecute() { } /** * Inject anything into the query that the display_extender handler needs. diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php index 0255179..e7fc991 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php @@ -178,7 +178,7 @@ function pre_render($values) { } function post_render(&$output) { } - function pre_execute() { } + public function preExecute() { } public function postExecute() { } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php index 49ef067..0f2e0e3 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php @@ -205,7 +205,7 @@ public function query() { } /** * Perform any needed actions just prior to the query executing. */ - function pre_execute(&$query) { } + public function preExecute(&$query) { } /** * Perform any needed actions just after the query executing. diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php index 708cdb2..aeb05ee 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php @@ -1482,7 +1482,7 @@ function execute(ViewExecutable $view) { } // Let the pager modify the query to add limits. - $view->pager->pre_execute($query); + $view->pager->preExecute($query); if (!empty($this->limit) || !empty($this->offset)) { // We can't have an offset without a limit, so provide a very large limit instead. diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayExtenderTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayExtenderTest.php index 3ab1a9b..5d9e69c 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayExtenderTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayExtenderTest.php @@ -53,7 +53,7 @@ public function testDisplayExtenders() { $this->assertTrue($display_extender instanceof \Drupal\views_test_data\Plugin\views\display_extender\DisplayExtenderTest, 'Make sure the right class got initialized.'); $view->preExecute(); - $this->assertTrue($display_extender->testState['pre_execute'], 'Make sure the display extender was able to react on preExecute.'); + $this->assertTrue($display_extender->testState['preExecute'], 'Make sure the display extender was able to react on preExecute.'); $view->execute(); $this->assertTrue($display_extender->testState['query'], 'Make sure the display extender was able to react on query.'); } diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewsHooksTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewsHooksTest.php index ad98fa6..d2e7e6c 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewsHooksTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewsHooksTest.php @@ -36,7 +36,7 @@ class ViewsHooksTest extends ViewUnitTestBase { 'views_pre_view' => 'view', 'views_pre_build' => 'view', 'views_post_build' => 'view', - 'views_pre_execute' => 'view', + 'views_preExecute' => 'view', 'views_post_execute' => 'view', 'views_pre_render' => 'view', 'views_post_render' => 'view', diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index 51f53fb..62a093f 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1166,7 +1166,7 @@ public function execute($display_id = NULL) { // Let modules modify the view just prior to executing it. $module_handler = \Drupal::moduleHandler(); - $module_handler->invokeAll('views_pre_execute', array($this)); + $module_handler->invokeAll('views_preExecute', array($this)); // Check for already-cached results. if (!empty($this->live_preview)) { diff --git a/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/display_extender/DisplayExtenderTest.php b/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/display_extender/DisplayExtenderTest.php index 82a212d..248526b 100644 --- a/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/display_extender/DisplayExtenderTest.php +++ b/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/display_extender/DisplayExtenderTest.php @@ -102,10 +102,10 @@ public function query() { } /** - * Overrides Drupal\views\Plugin\views\display\DisplayExtenderPluginBase::pre_execute(). + * Overrides Drupal\views\Plugin\views\display\DisplayExtenderPluginBase::preExecute(). */ - public function pre_execute() { - $this->testState['pre_execute'] = TRUE; + public function preExecute() { + $this->testState['preExecute'] = TRUE; } } diff --git a/core/modules/views/tests/views_test_data/views_test_data.views_execution.inc b/core/modules/views/tests/views_test_data/views_test_data.views_execution.inc index f37febf..79d4b53 100644 --- a/core/modules/views/tests/views_test_data/views_test_data.views_execution.inc +++ b/core/modules/views/tests/views_test_data/views_test_data.views_execution.inc @@ -92,10 +92,10 @@ function views_test_data_views_pre_view(ViewExecutable $view) { } /** - * Implements hook_views_pre_execute(). + * Implements hook_views_preExecute(). */ -function views_test_data_views_pre_execute(ViewExecutable $view) { - state()->set('views_hook_test_views_pre_execute', TRUE); +function views_test_data_views_preExecute(ViewExecutable $view) { + state()->set('views_hook_test_views_preExecute', TRUE); } /** diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php index 2be06b5..254dcf7 100644 --- a/core/modules/views/views.api.php +++ b/core/modules/views/views.api.php @@ -418,7 +418,7 @@ function hook_views_post_build(ViewExecutable &$view) { * * @see \Drupal\views\ViewExecutable */ -function hook_views_pre_execute(ViewExecutable &$view) { +function hook_views_preExecute(ViewExecutable &$view) { // Whenever a view queries more than two tables, show a message that notifies // view administrators that the query might be heavy. // (This action could be performed later in the execution process, but not diff --git a/core/modules/views/views.module b/core/modules/views/views.module index c0a9038..b089bc9 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -766,7 +766,7 @@ function views_hook_info() { 'views_pre_view', 'views_pre_build', 'views_post_build', - 'views_pre_execute', + 'views_preExecute', 'views_post_execute', 'views_pre_render', 'views_post_render',