diff --git a/core/modules/views/lib/Drupal/views/ManyToOneHelper.php b/core/modules/views/lib/Drupal/views/ManyToOneHelper.php index 1209901..392d3fc 100644 --- a/core/modules/views/lib/Drupal/views/ManyToOneHelper.php +++ b/core/modules/views/lib/Drupal/views/ManyToOneHelper.php @@ -46,11 +46,11 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Sometimes the handler might want us to use some kind of formula, so give * it that option. If it wants us to do this, it must set $helper->formula = TRUE - * and implement handler->get_formula(); + * and implement handler->getFormula(); */ public function getField() { if (!empty($this->formula)) { - return $this->handler->get_formula(); + return $this->handler->getFormula(); } else { return $this->handler->tableAlias . '.' . $this->handler->realField; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php index 3f510aa..e629947 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php @@ -174,7 +174,7 @@ public function adminLabel($short = FALSE) { public function getField($field = NULL) { if (!isset($field)) { if (!empty($this->formula)) { - $field = $this->get_formula(); + $field = $this->getFormula(); } else { $field = $this->tableAlias . '.' . $this->realField; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Date.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Date.php index 6294ee3..414d42d 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Date.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Date.php @@ -92,11 +92,11 @@ function get_sort_name() { } /** - * Overrides \Drupal\views\Plugin\views\argument\Formula::get_formula(). + * Overrides \Drupal\views\Plugin\views\argument\Formula::getFormula(). */ - function get_formula() { + public function getFormula() { $this->formula = $this->getDateFormat($this->argFormat); - return parent::get_formula(); + return parent::getFormula(); } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Formula.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Formula.php index d04982f..64eddc9 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Formula.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Formula.php @@ -38,7 +38,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o } } - function get_formula() { + public function getFormula() { return str_replace('***table***', $this->tableAlias, $this->formula); } @@ -48,7 +48,7 @@ function get_formula() { function summary_query() { $this->ensureMyTable(); // Now that our table is secure, get our formula. - $formula = $this->get_formula(); + $formula = $this->getFormula(); // Add the field. $this->base_alias = $this->name_alias = $this->query->add_field(NULL, $formula, $this->field); @@ -64,7 +64,7 @@ public function query($group_by = FALSE) { $this->ensureMyTable(); // Now that our table is secure, get our formula. $placeholder = $this->placeholder(); - $formula = $this->get_formula() .' = ' . $placeholder; + $formula = $this->getFormula() .' = ' . $placeholder; $placeholders = array( $placeholder => $this->argument, ); diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/String.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/String.php index 139bdd2..cc7a51c 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/String.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/String.php @@ -161,7 +161,7 @@ function summary_query() { } else { // Add the field. - $formula = $this->get_formula(); + $formula = $this->getFormula(); $this->base_alias = $this->query->add_field(NULL, $formula, $this->field . '_truncated'); $this->query->set_count_field(NULL, $formula, $this->field, $this->field . '_truncated'); } @@ -175,7 +175,7 @@ function summary_query() { * * $this->ensureMyTable() MUST have been called prior to this. */ - function get_formula() { + public function getFormula() { return "SUBSTRING($this->tableAlias.$this->realField, 1, " . intval($this->options['limit']) . ")"; } @@ -212,7 +212,7 @@ public function query($group_by = FALSE) { } else { $formula = TRUE; - $field = $this->get_formula(); + $field = $this->getFormula(); } if (count($this->value) > 1) {