function content_profile_get_types in Content Profile 6
Builds a list of available content types that are marked as content_profiles, and returns an array of content profile content types in the specified format.
Parameters
$op: When set to 'types', content profile content types are returned as type objects. When set to 'names', only their type names are returned.
$setting: If set, only content types that have this setting activated are returned. Leave it NULL to get all content profile types.
$value: The value to compare the given setting too.
17 calls to content_profile_get_types()
- ContentProfilePageEditProfile::getAdminForm in ./
content_profile.pageroute.inc - ContentProfilePageViewProfile::getAdminForm in ./
content_profile.pageroute.inc - content_profile_action_load_form in ./
content_profile.rules.inc - content_profile_help in ./
content_profile.module - Implementation of hook_help().
- content_profile_menu in ./
content_profile.module - Implementation of hook_menu().
File
- ./
content_profile.module, line 213
Code
function content_profile_get_types($op = 'types', $setting = NULL, $value = TRUE) {
$types = array();
foreach (node_get_types($op) as $type => $info) {
if (is_content_profile($type) && (!isset($setting) || content_profile_get_settings($type, $setting) == $value)) {
$types[$type] = $info;
}
}
return $types;
}