function _mobile_tools_get_active_purl_modifiers in Mobile Tools 7.3
Same name and namespace in other branches
- 7.2 mobile_tools.module \_mobile_tools_get_active_purl_modifiers()
Scan the active modifiers for any active mobile tools ones.
Parameters
array $modifiers: List of active PURL modifiers
Return value
array Returns an array of active mobile tools modifiers, FALSE otherwise.
1 call to _mobile_tools_get_active_purl_modifiers()
- mobile_tools_get_active_device_group in ./
mobile_tools.module - Get the active device group.
File
- ./
mobile_tools.module, line 775 - Functionality to ease the creation of mixed device environments.
Code
function _mobile_tools_get_active_purl_modifiers($modifiers, $provider = MOBILE_TOOLS_PURL_PROVIDER) {
// Store only active modifiers
$active_modifiers = FALSE;
// Mark each active modifier
foreach ($modifiers as $modifier_type) {
foreach ($modifier_type as $modifier) {
if (isset($modifier->provider) && $modifier->provider == $provider) {
$active_modifiers[] = $modifier;
}
}
}
// Return the list of active modifiers
return $active_modifiers;
}