Commit 2c2ae720 authored by alexpott's avatar alexpott

Issue #2002332 by mikedotexe, elvis2: Rename Views method add_table() to addTable().

parent 7ab5c07b
......@@ -65,7 +65,7 @@ public function query() {
$first_join = drupal_container()->get('plugin.manager.views.join')->createInstance($id, $first);
$this->first_alias = $this->query->add_table($this->definition['field table'], $this->relationship, $first_join);
$this->first_alias = $this->query->addTable($this->definition['field table'], $this->relationship, $first_join);
// Second, relate the field table to the entity specified using
// the entity id on the field table and the entity's id field.
......
......@@ -79,7 +79,7 @@ public function query($group_by = FALSE) {
$search_condition->condition("$search_index.type", $base_table);
if (!$this->search_query->simple()) {
$search_dataset = $this->query->add_table('search_dataset');
$search_dataset = $this->query->addTable('search_dataset');
$conditions = $this->search_query->conditions();
$condition_conditions =& $conditions->conditions();
foreach ($condition_conditions as $key => &$condition) {
......
......@@ -159,7 +159,7 @@ public function query() {
}
$search_condition->condition("$search_index.type", $base_table);
if (!$this->search_query->simple()) {
$search_dataset = $this->query->add_table('search_dataset');
$search_dataset = $this->query->addTable('search_dataset');
$conditions = $this->search_query->conditions();
$condition_conditions =& $conditions->conditions();
foreach ($condition_conditions as $key => &$condition) {
......
......@@ -72,7 +72,7 @@ public function query() {
$def['table'] = 'taxonomy_term_data';
if (!array_filter($this->options['vids'])) {
$taxonomy_index = $this->query->add_table('taxonomy_index', $this->relationship);
$taxonomy_index = $this->query->addTable('taxonomy_index', $this->relationship);
$def['left_table'] = $taxonomy_index;
$def['left_field'] = 'tid';
$def['field'] = 'tid';
......
......@@ -65,7 +65,7 @@ public function getField() {
* link point and adds *that* as a new relationship and then adds the table to
* the relationship, if necessary.
*/
function add_table($join = NULL, $alias = NULL) {
public function addTable($join = NULL, $alias = NULL) {
// This is used for lookups in the many_to_one table.
$field = $this->handler->relationship . '_' . $this->handler->table . '.' . $this->handler->field;
......@@ -97,7 +97,7 @@ function add_table($join = NULL, $alias = NULL) {
}
// And now add our table, using the new relationship if one was used.
$alias = $this->handler->query->add_table($this->handler->table, $relationship, $join, $alias);
$alias = $this->handler->query->addTable($this->handler->table, $relationship, $join, $alias);
// Store what values are used by this table chain so that other chains can
// automatically discard those values.
......@@ -148,7 +148,7 @@ function summary_join() {
);
}
}
return $this->add_table($join);
return $this->addTable($join);
}
}
......@@ -188,7 +188,7 @@ public function ensureMyTable() {
}
}
$this->handler->tableAlias = $this->add_table($join);
$this->handler->tableAlias = $this->addTable($join);
}
return $this->handler->tableAlias;
......@@ -220,7 +220,7 @@ public function ensureMyTable() {
}
$this->handler->view->many_to_one_aliases[$field][$value] = $this->handler->table . '_value_' . ($this->handler->view->many_to_one_count[$this->handler->table]++);
}
$alias = $this->handler->tableAliases[$value] = $this->add_table($join, $this->handler->view->many_to_one_aliases[$field][$value]);
$alias = $this->handler->tableAliases[$value] = $this->addTable($join, $this->handler->view->many_to_one_aliases[$field][$value]);
// and set table_alias to the first of these.
if (empty($this->handler->tableAlias)) {
......@@ -244,7 +244,7 @@ public function ensureMyTable() {
);
}
$this->handler->tableAlias = $this->add_table($join);
$this->handler->tableAlias = $this->addTable($join);
}
}
return $this->handler->tableAlias;
......
......@@ -828,7 +828,7 @@ function summary_name_field() {
if ($j) {
$join = clone $j;
$join->leftTable = $this->tableAlias;
$this->name_table_alias = $this->query->add_table($this->name_table, $this->relationship, $join);
$this->name_table_alias = $this->query->addTable($this->name_table, $this->relationship, $join);
}
}
else {
......
......@@ -364,7 +364,7 @@ function add_relationship($alias, JoinPluginBase $join, $base, $link_point = NUL
* adding parts to the query. Or FALSE if the table was not able to be
* added.
*/
function add_table($table, $relationship = NULL, JoinPluginBase $join = NULL, $alias = NULL) {
public function addTable($table, $relationship = NULL, JoinPluginBase $join = NULL, $alias = NULL) {
if (!$this->ensure_path($table, $relationship, $join)) {
return FALSE;
}
......@@ -379,7 +379,7 @@ function add_table($table, $relationship = NULL, JoinPluginBase $join = NULL, $a
/**
* Add a table to the query without ensuring the path.
*
* This is a pretty internal function to Views and add_table() or
* This is a pretty internal function to Views and addTable() or
* ensure_table() should be used instead of this one, unless you are
* absolutely sure this is what you want.
*
......@@ -554,7 +554,7 @@ function ensure_table($table, $relationship = NULL, JoinPluginBase $join = NULL)
//
// This can be done safely here but not lower down in
// queue_table(), because queue_table() is also used by
// add_table() which requires the ability to intentionally add
// addTable() which requires the ability to intentionally add
// the same table with the same join multiple times. For
// example, a view that filters on 3 taxonomy terms using AND
// needs to join taxonomy_term_data 3 times with the same join.
......
......@@ -53,7 +53,7 @@ public function query() {
);
$join = Views::pluginManager('join')->createInstance('standard', $definition);
$menu_links = $this->query->add_table('menu_links', NULL, $join);
$menu_links = $this->query->addTable('menu_links', NULL, $join);
$this->query->add_orderby($menu_links, 'weight', $this->options['order']);
$this->query->add_orderby($menu_links, 'link_title', $this->options['order']);
}
......
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