function themekey_purl_dummy2active_provider in ThemeKey 7.3
Same name and namespace in other branches
- 7.2 modules/themekey.purl.inc \themekey_purl_dummy2active_provider()
ThemeKey mapping function to set a ThemeKey property's value (destination) with the aid of another ThemeKey property (source).
src: system:dummy dst: purl:active_provider
Return value
string or NULL if no value could be mapped
1 string reference to 'themekey_purl_dummy2active_provider'
- themekey_purl_themekey_properties in modules/
themekey.purl.inc - Implements hook_themekey_properties().
File
- modules/
themekey.purl.inc, line 77 - @author Markus Kalkbrenner | bio.logis GmbH
Code
function themekey_purl_dummy2active_provider() {
// @see http://drupal.org/node/1529892
purl_init();
$active_providers = array();
foreach (purl_active()
->get() as $method => $items) {
if (is_array($items)) {
foreach ($items as $item) {
$active_providers[] = $item->provider;
}
}
}
if (!empty($active_providers)) {
return $active_providers;
}
return NULL;
}