Commit 022531af authored by alexpott's avatar alexpott
Browse files

Issue #2003368 by Dan Reinders, marlatt, NonProfit: Rename Views method...

Issue #2003368 by Dan Reinders, marlatt, NonProfit: Rename Views method pre_execute() to preExecute().
parent 86127734
......@@ -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'));
......
......@@ -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.
......
......@@ -178,7 +178,7 @@ function pre_render($values) { }
function post_render(&$output) { }
function pre_execute() { }
public function preExecute() { }
public function postExecute() { }
......
......@@ -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.
......
......@@ -1484,7 +1484,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.
......
......@@ -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.');
}
......
......@@ -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;
}
}
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