function mobile_tools_purl_modifiers in Mobile Tools 7.2
Same name and namespace in other branches
- 7.3 mobile_tools.module \mobile_tools_purl_modifiers()
 
Implements hook_purl_modifiers().
File
- ./
mobile_tools.module, line 322  - Functionality to ease the creation of mixed device environments.
 
Code
function mobile_tools_purl_modifiers() {
  // Load the device groups
  $device_groups = mobile_tools_device_groups();
  // Create the modifiers container
  $modifiers = array();
  // Each device group gets a modifier associated to it
  foreach ($device_groups as $id => $name) {
    $modifiers['spaces_mobile_tools_' . $id] = array(
      // @todo find a way to allow a value other than the id
      array(
        'value' => $id,
        'id' => $id,
      ),
    );
  }
  // Test modifier
  $modifiers['spaces_mobile_tools'] = array(
    array(
      'value' => 'mobile',
      'id' => 'mobile',
    ),
  );
  return $modifiers;
}