function spaces_content_types in Spaces 5.2
Same name and namespace in other branches
- 5 spaces.module \spaces_content_types()
- 6 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.
3 calls to spaces_content_types()
- spaces_og_requirements in ./
spaces_og.module - Implementation of hook_requirements().
- _spaces_enforce_feature in ./
spaces_og.module - API function that enforces OG group and privacy settings on a node.
- _spaces_og_group_options in ./
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 1013
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;
}