You are here

function references_dialog_get_views_search_links in References dialog 7

Get all views search links for an instance. This function should be used by references dialog widgets that uses views for it's search functionality.

Parameters

type $instance:

2 calls to references_dialog_get_views_search_links()
references_dialog_build_element in ./references_dialog.module
references_dialog_get_field_search_links in ./references_dialog.module

File

./references_dialog.module, line 619
This the main module file.

Code

function references_dialog_get_views_search_links($attachable) {
  $applicable_views = references_dialog_get_search_views($attachable);
  $links = array();
  foreach ($applicable_views as $view_name => $view) {
    $links[] = references_dialog_link(array(
      'title' => $view['title'],
      'href' => 'references-dialog/search/' . $view_name . '/' . $view['display'] . '/' . $attachable,
    ));
  }
  return $links;
}