You are here

function hook_mobile_tools_device_groups in Mobile Tools 7.2

Same name and namespace in other branches
  1. 7.3 mobile_tools.api.php \hook_mobile_tools_device_groups()

Define the list of device groups available to mobile_tools

Set a list of id/human readable pairs of arbitrary device groupings. Do not wrap the name in the t() function. The value will be translated later on before display to ensure proper translation.

You can name your device groups however you like. Ensure the keys contain only lowercase, alphanumeric values along with dashes and/or underscores.

Used to define a device "space" and used as the default values in the hook_purl_provider() implementation in mobile_tools.module

Only one implementation of this hook is triggered at any given time. The options for which module to use are configurable in the administrative pages for mobile_tools.

Return value

array Returns an array of device groups

1 function implements hook_mobile_tools_device_groups()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

mobile_tools_mobile_tools_device_groups in ./mobile_tools.module
Implements hook_mobile_tools_device_groups().
1 invocation of hook_mobile_tools_device_groups()
mobile_tools_device_groups_rebuild in ./mobile_tools.module
Rebuild the list of implemented device groups

File

./mobile_tools.api.php, line 29
API functions for mobile_tools

Code

function hook_mobile_tools_device_groups() {
  return array(
    'iphone' => 'iPhone',
    'ipod' => 'iPod',
    'ipad' => 'iPad',
    'android' => 'Android',
    'opera_mini' => 'Opera Mini',
    'blackberry' => 'BlackBerry',
  );
}