You are here

function viewreference_get_views in View reference 7.3

Same name and namespace in other branches
  1. 6.3 viewreference.module \viewreference_get_views()

Get an array of views.

Parameters

bool $append_id: Whether to append the id to the returned display names.

array $settings: The settings of the field.

bool $full: If TRUE will return all the data, rather than just the title.

string $string: String to match against the title to filter results by.

bool $exact_string: If TRUE the $string parameter must match exactly.

bool $long_key: If TRUE will key array by the title and ID, not just the ID.

Return value

mixed[] The array of views. The array value type depends on the parameters.

6 calls to viewreference_get_views()
viewreference_autocomplete in ./viewreference.module
Menu callback for the autocomplete results.
viewreference_autocomplete_validate in ./viewreference.module
Validation callback for a viewreference_autocomplete element.
viewreference_autocomplete_value in ./viewreference.module
Value callback for a viewreference_autocomplete element.
viewreference_field_settings_form in ./viewreference.module
Implements hook_field_settings_form().
viewreference_field_validate in ./viewreference.module
Implements hook_field_validate().

... See full list

File

./viewreference.module, line 626
Defines a field type for referencing a view from a node.

Code

function viewreference_get_views($append_id = FALSE, $settings = NULL, $full = FALSE, $string = '', $exact_string = FALSE, $long_key = FALSE) {

  /** @var views_display[] $views_displays */
  $views_displays = _viewreference_get_applicable_views_displays($settings);
  return _viewreference_extract_views_displays($settings, $views_displays, $append_id, $full, $string, $exact_string, $long_key);
}