You are here

function _get_views_using_termid in View Alias 5

Same name and namespace in other branches
  1. 6 view_alias.module \_get_views_using_termid()

get the views that use taxonomy id's as arguments return array of small view objects with view id, view name, and view url

Return value

array of objects with vid, name, and url attributes

2 calls to _get_views_using_termid()
view_alias_admin_settings in ./view_alias.module
Admin settings for module
view_alias_admin_settings_submit in ./view_alias.module

File

./view_alias.module, line 254
view_alias.module

Code

function _get_views_using_termid() {
  $views = array();
  $query = "SELECT v.vid, v.name, v.url ";
  $query .= "FROM {view_view} v ";
  $query .= "JOIN {view_argument} a on v.vid = a.vid ";
  $query .= "WHERE v.page = 1 and a.type = 'taxid'";
  $result = db_query($query);
  while ($view = db_fetch_object($result)) {
    $views[] = $view;
  }
  return $views;
}