function Query::doGetTables
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/Query/Sql/Query.php \Drupal\Core\Entity\Query\Sql\Query::doGetTables()
Gets the Tables object for this query.
@internal
Parameters
?\Drupal\Core\Database\Query\SelectInterface $sql_query: The SQL query object being built. Deprecated, do not use.
Return value
\Drupal\Core\Entity\Query\Sql\TablesInterface The object that adds tables and fields to the SQL query object.
1 call to Query::doGetTables()
- Query::getTables in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ Query.php - Gets the Tables object for this query.
File
-
core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ Query.php, line 372
Class
- Query
- The SQL storage entity query class.
Namespace
Drupal\Core\Entity\Query\SqlCode
public function doGetTables(?SelectInterface $sql_query = NULL) {
if (isset($sql_query)) {
if ($sql_query !== $this->sqlQuery) {
// Old behavior if a different query is passed in.
$class = static::getClass($this->namespaces, 'Tables');
return new $class($sql_query);
}
}
if (!$this->tables) {
$class = static::getClass($this->namespaces, 'Tables');
$this->tables = new $class($this->sqlQuery);
}
return $this->tables;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.