function Sql::markTable
1 call to Sql::markTable()
- Sql::queueTable in core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php  - Add a table to the query without ensuring the path.
 
File
- 
              core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php, line 554  
Class
- Sql
 - Views query plugin for an SQL query.
 
Namespace
Drupal\views\Plugin\views\queryCode
protected function markTable($table, $relationship, $alias) {
  // Mark that this table has been added.
  if (empty($this->tables[$relationship][$table])) {
    if (!isset($alias)) {
      $alias = '';
      if ($relationship != $this->view->storage
        ->get('base_table')) {
        // Double underscore will help prevent accidental name
        // space collisions.
        $alias = $relationship . '__';
      }
      $alias .= $table;
    }
    $this->tables[$relationship][$table] = [
      'count' => 1,
      'alias' => $alias,
    ];
  }
  else {
    $this->tables[$relationship][$table]['count']++;
  }
  return $alias;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.