function Sql::getTableInfo
Same name in other branches
- 9 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getTableInfo()
- 8.9.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getTableInfo()
- 11.x core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::getTableInfo()
Get the information associated with a table.
If you need the alias of a table with a particular relationship, use ensureTable().
File
-
core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php, line 799
Class
- Sql
- Views query plugin for an SQL query.
Namespace
Drupal\views\Plugin\views\queryCode
public function getTableInfo($table) {
if (!empty($this->tableQueue[$table])) {
return $this->tableQueue[$table];
}
// In rare cases we might *only* have aliased versions of the table.
if (!empty($this->tables[$this->view->storage
->get('base_table')][$table])) {
$alias = $this->tables[$this->view->storage
->get('base_table')][$table]['alias'];
if (!empty($this->tableQueue[$alias])) {
return $this->tableQueue[$alias];
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.