You are here

function mobile_tools_purl_modifiers in Mobile Tools 7.3

Same name and namespace in other branches
  1. 7.2 mobile_tools.module \mobile_tools_purl_modifiers()

Implements hook_purl_modifiers().

File

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

Code

function mobile_tools_purl_modifiers() {

  // Load the device groups
  $device_groups = mobile_tools_device_group_load_all();

  // Create the modifiers container
  $modifiers = array();

  // Each device group gets a modifier associated to it
  foreach ($device_groups as $device_group) {
    $modifiers[MOBILE_TOOLS_PURL_PROVIDER][] = array(
      'value' => $device_group->purl_modifier,
      'id' => $device_group->dgid,
    );
  }
  return $modifiers;
}