function ViewExecutable::getBaseTables

Same name in other branches
  1. 9 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::getBaseTables()
  2. 8.9.x core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::getBaseTables()
  3. 10 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::getBaseTables()

Creates a list of base tables to be used by the view.

This is used primarily for the UI. The display must be already initialized.

Return value

array An array of base tables to be used by the view.

File

core/modules/views/src/ViewExecutable.php, line 1028

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function getBaseTables() {
    $base_tables = [
        $this->storage
            ->get('base_table') => TRUE,
        '#global' => TRUE,
    ];
    foreach ($this->display_handler
        ->getHandlers('relationship') as $handler) {
        $base_tables[$handler->definition['base']] = TRUE;
    }
    return $base_tables;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.