You are here

function view::get_base_tables in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 includes/view.inc \view::get_base_tables()
  2. 7.3 includes/view.inc \view::get_base_tables()

Create a list of base tables eligible for this view. Used primarily for the UI. Display must be already initialized.

File

includes/view.inc, line 553
view.inc Provides the view object type and associated methods.

Class

view
An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.

Code

function get_base_tables() {
  $base_tables = array(
    $this->base_table => TRUE,
    '#global' => TRUE,
  );
  foreach ($this->display_handler
    ->get_handlers('relationship') as $handler) {
    $base_tables[$handler->definition['base']] = TRUE;
  }
  return $base_tables;
}