You are here

function _mobile_tools_get_device_detectors in Mobile Tools 7.3

List of device detection modules

Parameters

boolean $clear [optional]: Force the cache to be cleared

Return value

array Returns the list of modules which implement hook_mobile_tools_device_detector_info().

4 calls to _mobile_tools_get_device_detectors()
MobileToolsBrowscapTestCase::testNewDeviceGroupWithDetection in mobile_tools_browscap/mobile_tools_browscap.test
mobile_tools_admin_settings_form in ./mobile_tools.admin.inc
Admin form for global Mobile Tools settings
mobile_tools_device_group_form in ./mobile_tools.admin.inc
Form to add a new device group
mobile_tools_modules_disabled in ./mobile_tools.module
Implements hook_modules_disabled().

File

./mobile_tools.module, line 825
Functionality to ease the creation of mixed device environments.

Code

function _mobile_tools_get_device_detectors($clear = FALSE) {
  $detectors =& drupal_static(__FUNCTION__);
  if (!isset($detectors) or $clear) {

    // Check if device detection is available.
    foreach (module_implements('mobile_tools_device_detector_info') as $module) {
      $detectors[$module] = call_user_func($module . '_mobile_tools_device_detector_info');
    }
  }
  return $detectors;
}