You are here

function spaces_content_types in Spaces 6

Same name and namespace in other branches
  1. 5.2 spaces.module \spaces_content_types()
  2. 5 spaces.module \spaces_content_types()

Returns a content type => features map.

Parameters

$reset: Optional boolean flag for resetting the static cache.

Return value

Keyed array where $nodetype => $feature.

4 calls to spaces_content_types()
spaces_handler_field_spaces_feature::render in includes/spaces_handler_field_spaces_feature.inc
spaces_og_requirements in spaces_og/spaces_og.module
Implementation of hook_requirements().
_spaces_enforce_feature in spaces_og/spaces_og.module
API function that enforces OG group and privacy settings on a node.
_spaces_og_group_options in spaces_og/spaces_og.module
Generates an array of groups that a node could potentially be a member of based on enabled spaces features and optionally the specified user's groups

File

./spaces.module, line 1405

Code

function spaces_content_types($reset = FALSE) {
  static $map;
  if (!isset($map) || $reset) {
    $map = array();
    $features = spaces_features();
    foreach ($features as $id => $feature) {
      if (is_array($feature->node)) {
        foreach ($feature->node as $type) {
          $map[$type] = $id;
        }
      }
    }
  }
  return $map;
}