From cbc907fa790a5de38a04605f594ccd9b8dba9fe8 Mon Sep 17 00:00:00 2001 From: webchick Date: Tue, 4 Jun 2013 21:16:14 -0500 Subject: [PATCH] Issue #2002974 by tvlooy, kenianbei, danylevskyi | Dan Reinders: Rename Views method title_query() to titleQuery(). --- .../file/lib/Drupal/file/Plugin/views/argument/Fid.php | 4 ++-- .../node/lib/Drupal/node/Plugin/views/argument/Nid.php | 2 +- .../node/lib/Drupal/node/Plugin/views/argument/Vid.php | 2 +- .../lib/Drupal/taxonomy/Plugin/views/argument/IndexTid.php | 2 +- .../user/lib/Drupal/user/Plugin/views/argument/RolesRid.php | 2 +- .../user/lib/Drupal/user/Plugin/views/argument/Uid.php | 2 +- .../lib/Drupal/views/Plugin/views/argument/ManyToOne.php | 4 ++-- .../views/lib/Drupal/views/Plugin/views/argument/Numeric.php | 4 ++-- .../views/lib/Drupal/views/Plugin/views/argument/String.php | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php b/core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php index d0fb508650c..6906e01e1e2 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php +++ b/core/modules/file/lib/Drupal/file/Plugin/views/argument/Fid.php @@ -20,9 +20,9 @@ use Drupal\views\Plugin\views\argument\Numeric; class Fid extends Numeric { /** - * Override the behavior of title_query(). Get the filenames. + * Override the behavior of titleQuery(). Get the filenames. */ - function title_query() { + public function titleQuery() { $titles = db_select('file_managed', 'f') ->fields('f', array('filename')) ->condition('fid', $this->value) diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/argument/Nid.php b/core/modules/node/lib/Drupal/node/Plugin/views/argument/Nid.php index 4519778b522..ca7aa8c5720 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/argument/Nid.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/argument/Nid.php @@ -20,7 +20,7 @@ class Nid extends Numeric { /** * Override the behavior of title(). Get the title of the node. */ - function title_query() { + public function titleQuery() { $titles = array(); $nodes = node_load_multiple($this->value); diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/argument/Vid.php b/core/modules/node/lib/Drupal/node/Plugin/views/argument/Vid.php index eb2565b0e11..f61dd75ad23 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/argument/Vid.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/argument/Vid.php @@ -22,7 +22,7 @@ class Vid extends Numeric { /** * Override the behavior of title(). Get the title of the revision. */ - function title_query() { + public function titleQuery() { $titles = array(); $results = db_select('node_field_revision', 'npr') diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument/IndexTid.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument/IndexTid.php index f51a5ce778e..719756077a3 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument/IndexTid.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument/IndexTid.php @@ -43,7 +43,7 @@ class IndexTid extends ManyToOne { return views_taxonomy_set_breadcrumb($breadcrumb, $this); } - function title_query() { + public function titleQuery() { $titles = array(); $result = db_select('taxonomy_term_data', 'td') ->fields('td', array('name')) diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php b/core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php index bbef57ee9cb..6a878ea8634 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php @@ -19,7 +19,7 @@ use Drupal\views\Plugin\views\argument\ManyToOne; */ class RolesRid extends ManyToOne { - function title_query() { + public function titleQuery() { return array(entity_load('user_role', $this->value)->label()); } diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/argument/Uid.php b/core/modules/user/lib/Drupal/user/Plugin/views/argument/Uid.php index 82c5b75f427..5bd0bff5de9 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/argument/Uid.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/argument/Uid.php @@ -25,7 +25,7 @@ class Uid extends Numeric { * @return array * A list of usernames. */ - function title_query() { + public function titleQuery() { if (!$this->argument) { return array(config('user.settings')->get('anonymous')); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/ManyToOne.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ManyToOne.php index 2cb77e03315..0f5a07e9ade 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/ManyToOne.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ManyToOne.php @@ -158,7 +158,7 @@ class ManyToOne extends ArgumentPluginBase { return !empty($this->definition['invalid input']) ? $this->definition['invalid input'] : t('Invalid input'); } - return implode($this->operator == 'or' ? ' + ' : ', ', $this->title_query()); + return implode($this->operator == 'or' ? ' + ' : ', ', $this->titleQuery()); } function summary_query() { @@ -196,7 +196,7 @@ class ManyToOne extends ArgumentPluginBase { /** * Override for specific title lookups. */ - function title_query() { + public function titleQuery() { return $this->value; } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Numeric.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Numeric.php index d9453d176e5..0e433d73dd4 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Numeric.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Numeric.php @@ -82,7 +82,7 @@ class Numeric extends ArgumentPluginBase { return !empty($this->definition['invalid input']) ? $this->definition['invalid input'] : t('Invalid input'); } - return implode($this->operator == 'or' ? ' + ' : ', ', $this->title_query()); + return implode($this->operator == 'or' ? ' + ' : ', ', $this->titleQuery()); } /** @@ -90,7 +90,7 @@ class Numeric extends ArgumentPluginBase { * @return array * Returns all titles, if it's just one title it's an array with one entry. */ - function title_query() { + public function titleQuery() { return $this->value; } 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 ccb4d545b4a..ce22e1a6763 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 @@ -278,13 +278,13 @@ class String extends ArgumentPluginBase { return !empty($this->definition['invalid input']) ? $this->definition['invalid input'] : t('Invalid input'); } - return implode($this->operator == 'or' ? ' + ' : ', ', $this->title_query()); + return implode($this->operator == 'or' ? ' + ' : ', ', $this->titleQuery()); } /** * Override for specific title lookups. */ - function title_query() { + public function titleQuery() { return drupal_map_assoc($this->value, 'check_plain'); }