function msnf_content_types in Multistep Nodeform 6
Return a list of all content types.
Parameters
$content_type_name: If set, return information on just this type.
If content.module is active, return its implementation of content_types(). Otherwise build the information we need manually.
7 calls to msnf_content_types()
- msnf_menu in ./
msnf.module - Implementation of hook_menu().
- msnf_step_edit_form in includes/
msnf.admin.inc - Menu callback to provide a form for editing a single step.
- msnf_step_features_export_options in includes/
msnf.features.inc - Implementation of hook_features_export_options().
- msnf_step_features_export_render in includes/
msnf.features.inc - Implementation of hook_features_export_render().
- msnf_step_overview_form in includes/
msnf.admin.inc - Menu callback; listing of steps for a content type.
File
- ./
msnf.module, line 600 - Main functions for module "Multistep Nodeform".
Code
function msnf_content_types($type_name = NULL) {
if (module_exists('fieldgroup')) {
// Add information about fieldgroups.
}
if (module_exists('content')) {
// content.module is installed, so return the data collected there.
return content_types($type_name);
}
// handle type name with either an underscore or a dash
$type_name = !empty($type_name) ? str_replace('-', '_', $type_name) : NULL;
$info = _msnf_content_type_info();
if (isset($info['content types'])) {
if (!isset($type_name)) {
return $info['content types'];
}
if (isset($info['content types'][$type_name])) {
return $info['content types'][$type_name];
}
}
return array(
'tables' => array(),
'fields' => array(),
'extra' => array(),
);
}