You are here

function mobile_tools_device_groups in Mobile Tools 6.2

Same name and namespace in other branches
  1. 5 mobile_tools.module \mobile_tools_device_groups()
  2. 6.3 mobile_tools.module \mobile_tools_device_groups()
  3. 6 mobile_tools.module \mobile_tools_device_groups()
  4. 7.2 mobile_tools.module \mobile_tools_device_groups()

Get a list of device groups.

Return value

array An array of device groups.

3 calls to mobile_tools_device_groups()
mobile_tools_context_condition_mobile::condition_values in plugins/mobile_tools_context_condition_mobile.inc
mobile_tools_get_device in ./mobile_tools.module
Get $device object.
mobile_tools_is_mobile_ctools_access_settings in plugins/access/is_mobile.inc
Settings form for the 'by perm' access plugin

File

./mobile_tools.module, line 465
Primarily Drupal hooks.

Code

function mobile_tools_device_groups() {
  static $device_groups;
  if (!isset($device_groups)) {
    $module = variable_get('mobile-tools-device-detection', NULL);
    if (isset($module)) {
      drupal_load('module', $module);
      $device_groups = module_invoke($module, 'device_groups_info');
    }
    else {
      $device_groups = array();
    }
  }
  return $device_groups;
}