You are here

function mobile_tools_purl_provider in Mobile Tools 7.3

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

Implements hook_purl_provider().

File

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

Code

function mobile_tools_purl_provider() {
  $items = array();

  // Create a purl provider entry for device groups
  $items[MOBILE_TOOLS_PURL_PROVIDER] = array(
    'name' => t('Device Group'),
    'description' => t('Active Device group'),
    'callback' => 'mobile_tools_activate_device_group',
  );

  // Check for the session api module
  if (module_exists('session_api')) {
    $description = t('When activated, automatic redirection is disabled.');
  }
  else {
    $description = t('Enable the !session_api module to use the skip redirection functionality.', array(
      '!session_api' => l('Session API', 'http://drupal.org/project/session_api'),
    ));
  }
  $items[MOBILE_TOOLS_PURL_PROVIDER_SKIP_REDIRECT] = array(
    'name' => t('Skip Redirect'),
    'description' => $description,
    'callback' => 'mobile_tools_skip_redirect',
  );
  return $items;
}