You are here

function getlocations_blocks_check_view in Get Locations 7.2

Same name and namespace in other branches
  1. 7 modules/getlocations_blocks/getlocations_blocks.module \getlocations_blocks_check_view()

Check that a view is enabled.

Parameters

string $view The Views machine name:

Return value

bool

1 call to getlocations_blocks_check_view()
getlocations_blocks_block_configure in modules/getlocations_blocks/getlocations_blocks.module
Implements hook_block_configure().

File

modules/getlocations_blocks/getlocations_blocks.module, line 1004
getlocations_blocks.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_blocks_check_view($view) {
  $views = views_get_enabled_views();
  $views_names = array();
  foreach (array_keys($views) as $key) {
    $views_names[] = $key;
  }
  if (in_array($view, $views_names)) {
    return TRUE;
  }
  return FALSE;
}