function devel_generate_content_types in Devel 6
2 calls to devel_generate_content_types()
- devel_generate_content_form in ./
devel_generate.module - Generates nodes using FormAPI.
- drush_devel_generate_generate_content in ./
devel_generate.drush.inc - Command callback. Generate a number of content.
File
- ./
devel_generate.inc, line 254
Code
function devel_generate_content_types() {
$options = array();
if (module_exists('content')) {
$types = content_types();
foreach ($types as $type) {
$warn = '';
if (count($type['fields'])) {
$warn = t('. This type contains CCK fields which will only be populated by fields that implement the content_generate hook.');
}
$options[$type['type']] = t($type['name']) . $warn;
}
}
else {
$types = node_get_types();
foreach ($types as $type) {
$options[$type->type] = t($type->name);
}
}
// we cannot currently generate valid polls.
unset($options['poll']);
return $options;
}