function views_get_table_join

cis7 handlers.inc views_get_table_join($table, $base_table)
cle7 handlers.inc views_get_table_join($table, $base_table)
elmsmedia7 handlers.inc views_get_table_join($table, $base_table)
icor7 handlers.inc views_get_table_join($table, $base_table)
meedjum_blog7 handlers.inc views_get_table_join($table, $base_table)
mooc7 handlers.inc views_get_table_join($table, $base_table)

Fetch a handler to join one table to a primary table from the data cache

4 calls to views_get_table_join()
views_handler::get_join in sites/all/modules/ulmus/views/includes/handlers.inc
Get the join object that should be used for this handler.
views_handler_argument::summary_name_field in sites/all/modules/ulmus/views/handlers/views_handler_argument.inc
Add the name field, which is the field displayed in summary queries. This is often used when the argument is numeric.
views_many_to_one_helper::add_table in sites/all/modules/ulmus/views/includes/handlers.inc
Add a table to the query.
views_plugin_query_default::get_join_data in sites/all/modules/ulmus/views/plugins/views_plugin_query_default.inc
Retrieve join data from the larger join data cache.

File

sites/all/modules/ulmus/views/includes/handlers.inc, line 93
Defines the various handler objects to help build and display views.

Code

function views_get_table_join($table, $base_table) {
  $data = views_fetch_data($table);
  if (isset($data['table']['join'][$base_table])) {
    $h = $data['table']['join'][$base_table];
    if (!empty($h['handler']) && class_exists($h['handler'])) {
      $handler = new $h['handler'];
    }
    else {
      $handler = new views_join();
    }

    // Fill in some easy defaults
    $handler->definition = $h;
    if (empty($handler->definition['table'])) {
      $handler->definition['table'] = $table;
    }
    // If this is empty, it's a direct link.
    if (empty($handler->definition['left_table'])) {
      $handler->definition['left_table'] = $base_table;
    }

    if (isset($h['arguments'])) {
      call_user_func_array(array(&$handler, 'construct'), $h['arguments']);
    }
    else {
      $handler->construct();
    }

    return $handler;
  }

  // DEBUG -- identify missing handlers
  vpr("Missing join: @table @base_table", array('@table' => $table, '@base_table' => $base_table));
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.