function webform_admin_type_list in Webform 6.3
Same name and namespace in other branches
- 7.4 includes/webform.admin.inc \webform_admin_type_list()
- 7.3 includes/webform.admin.inc \webform_admin_type_list()
Create a comma-separate list of content types that are webform enabled.
2 calls to webform_admin_type_list()
- theme_webform_admin_content in includes/
webform.admin.inc - Generate a list of all webforms avaliable on this site.
- webform_help in ./
webform.module - Implements hook_help().
File
- includes/
webform.admin.inc, line 236 - Administration pages provided by Webform module.
Code
function webform_admin_type_list() {
$webform_types = webform_variable_get('webform_node_types');
$webform_type_list = '';
$webform_type_count = count($webform_types);
foreach ($webform_types as $n => $type) {
$webform_type_list .= l(node_get_types('name', $type), 'node/add/' . $type);
if ($n + 1 < $webform_type_count) {
$webform_type_list .= $webform_type_count == 2 ? ' ' : ', ';
}
if ($n + 2 == $webform_type_count) {
$webform_type_list .= t('or') . ' ';
}
}
return $webform_type_list;
}