Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Sql.php

function 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 821

Class

Sql
Views query plugin for an SQL query.

Namespace

Drupal\views\Plugin\views\query

Code

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];
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal