function hosting_feature_node_types in Hostmaster (Aegir) 6
Determine which node types are provided by Hosting features.
Parameters
$refresh: (optional) Pass in TRUE to force the list of node types to be rebuilt and not returned from the cache.
Return value
An array of node types keyed by the Hosting feature that provides them.
2 calls to hosting_feature_node_types()
- hosting_menu_alter in modules/
hosting/ hosting.module - Implementation of hook_menu_alter().
- hosting_node_grants in modules/
hosting/ client/ hosting_client.access.inc - Implements hook_node_grants().
File
- modules/
hosting/ hosting.features.inc, line 228 - Include for functionality related to Hosting module features.
Code
function hosting_feature_node_types($refresh = FALSE) {
static $types;
if (!is_array($types) || $refresh) {
$features = hosting_get_features($refresh);
foreach ($features as $feature => $info) {
if (!empty($info['node'])) {
$types[$feature] = $info['node'];
}
}
}
return $types;
}