1 handlers.inc views_handler::ensure_my_table()

Ensure the main table for this handler is in the query. This is used a lot.

File

core/modules/views/includes/handlers.inc, line 530
Defines the various handler objects to help build and display views.

Class

views_handler
Base handler, from which all the other handlers are derived. It creates a common interface to create consistency amongst handlers and data.

Code

function ensure_my_table() {
  if (!isset($this->table_alias)) {
    if (!method_exists($this->query, 'ensure_table')) {
      watchdog('views', t('Ensure my table called but query has no ensure_table method.'));
      return;
    }
    $this->table_alias = $this->query->ensure_table($this->table, $this->relationship);
  }
  return $this->table_alias;
}