Issue #2003368 by Dan Reinders, marlatt, NonProfit: Rename Views method pre_execute() to preExecute().

8.0.x
Alex Pott 2013-05-30 00:37:05 +01:00
parent 861277341c
commit 022531af66
7 changed files with 10 additions and 10 deletions

View File

@ -2531,11 +2531,11 @@ abstract class DisplayPluginBase extends PluginBase {
$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'));

View File

@ -41,7 +41,7 @@ abstract class DisplayExtenderPluginBase extends PluginBase {
/**
* 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.

View File

@ -178,7 +178,7 @@ abstract class ExposedFormPluginBase extends PluginBase {
function post_render(&$output) { }
function pre_execute() { }
public function preExecute() { }
public function postExecute() { }

View File

@ -205,7 +205,7 @@ abstract class PagerPluginBase extends PluginBase {
/**
* 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.

View File

@ -1484,7 +1484,7 @@ class Sql extends QueryPluginBase {
}
// 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.

View File

@ -53,7 +53,7 @@ class DisplayExtenderTest extends PluginTestBase {
$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.');
}

View File

@ -102,10 +102,10 @@ class DisplayExtenderTest extends DisplayExtenderPluginBase {
}
/**
* 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;
}
}