function mobile_tools_purl_provider in Mobile Tools 7.2
Same name and namespace in other branches
- 7.3 mobile_tools.module \mobile_tools_purl_provider()
Implements hook_purl_provider().
File
- ./
mobile_tools.module, line 289 - Functionality to ease the creation of mixed device environments.
Code
function mobile_tools_purl_provider() {
$items = array();
$device_groups = mobile_tools_device_groups();
// Create a purl provider entry for each device group
// @todo see if we actually need an entry for each. Might be sufficient
// to have one entry for each in the modifiers instead
foreach ($device_groups as $id => $name) {
$items['spaces_mobile_tools_' . $id] = array(
'name' => t('Device Group: @group', array(
'@group' => t($name),
)),
'description' => t('Device group space for @group', array(
'@group' => t($name),
)),
'callback' => 'spaces_init_space',
'callback arguments' => array(
MOBILE_TOOLS_DEVICE_GROUP_PREFIX . $id,
),
'example' => $id,
);
}
// Default test groups
$items['spaces_mobile_tools'] = array(
'name' => t('Device Group: @group', array(
'@group' => t('Mobile'),
)),
'description' => t('Trigger the mobile site using the given criteria.'),
'callback' => 'spaces_init_space',
'callback arguments' => array(
'mobile_tools',
),
'example' => 'mobile-tools',
);
return $items;
}