You are here

function profile_views_tables in Views (for Drupal 7) 5

This include file implements views functionality on behalf of profile.module

File

modules/views_profile.inc, line 7

Code

function profile_views_tables() {

  // add all profile fields as possible display fields and filters
  $profile_fields = profile_views_get_fields();
  foreach ($profile_fields as $field) {
    $tables["{$field->name}"] = views_new_table('profile_values', 'internal', 'users', 'uid', 'uid', array(
      'fid' => $field->fid,
    ));
    profile_views_add_field($tables["{$field->name}"], $field);
    profile_views_add_sort($tables["{$field->name}"], $field);
    profile_views_add_filter($tables["{$field->name}"], $field);
  }
  return $tables;
}