You are here

function hosting_feature_node_types in Hosting 6.2

Same name and namespace in other branches
  1. 5 hosting.features.inc \hosting_feature_node_types()
  2. 7.4 hosting.features.inc \hosting_feature_node_types()
  3. 7.3 hosting.features.inc \hosting_feature_node_types()

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_client_node_grants in client/hosting_client.access.inc
Implements hook_node_grants().
hosting_menu_alter in ./hosting.module
Implementation of hook_menu_alter().

File

./hosting.features.inc, line 337
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;
}