function hosting_feature_node_types in Hosting 7.4
Same name and namespace in other branches
- 5 hosting.features.inc \hosting_feature_node_types()
- 6.2 hosting.features.inc \hosting_feature_node_types()
- 7.3 hosting.features.inc \hosting_feature_node_types()
Determine which node types are provided by Hosting features.
Parameters
bool $refresh: (optional) Pass in TRUE to force the list of node types to be rebuilt and not returned from the cache.
Return value
true An array of node types keyed by the Hosting feature that provides them.
2 calls to hosting_feature_node_types()
- hosting_client_node_grants in client/
hosting_client.access.inc - Implements hook_node_grants().
- hosting_menu_alter in ./
hosting.module - Implements hook_menu_alter().
File
- ./
hosting.features.inc, line 336 - 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;
}