You are here

function getlocations_access_location in Get Locations 7

Same name and namespace in other branches
  1. 6.2 getlocations.module \getlocations_access_location()
  2. 6 getlocations.module \getlocations_access_location()
  3. 7.2 getlocations.module \getlocations_access_location()

Access callback: Checks for access permission and if there is a supported locative module installed

Return value

bool

1 call to getlocations_access_location()
getlocations_search_type_options in modules/getlocations_search/getlocations_search.module
Collect information about which entity_types have fields for supported module and return an array suitable for a dropdown
3 string references to 'getlocations_access_location'
getlocations_leaflet_menu in modules/getlocations_leaflet/getlocations_leaflet.module
Implements hook_menu().
getlocations_mapquest_menu in modules/getlocations_mapquest/getlocations_mapquest.module
Implements hook_menu().
getlocations_menu in ./getlocations.module
Implements hook_menu().

File

./getlocations.module, line 279
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_access_location() {
  if (user_access('access getlocations')) {
    $modules = getlocations_supported_modules();
    foreach ($modules as $module) {
      if (module_exists($module)) {
        return TRUE;
      }
    }
  }
  return FALSE;
}