function total_control_node_types_content_type_edit_form in Total Control Admin Dashboard 7.2
Same name and namespace in other branches
- 6.2 plugins/content_types/node_types.inc \total_control_node_types_content_type_edit_form()
'Edit form' callback for the content type.
File
- plugins/
content_types/ node_types.inc, line 96
Code
function total_control_node_types_content_type_edit_form($form, &$form_state) {
$conf = $form_state['conf'];
$types = node_type_get_types();
$type_options = array();
$type_defaults = array();
if (isset($conf['types'])) {
$type_defaults = $conf['types'];
}
foreach ($types as $type => $object) {
$type_options[$type] = $object->name;
if (!array_key_exists($type, $type_defaults)) {
$type_defaults[$type] = $type;
}
}
$form['types'] = array(
'#type' => 'checkboxes',
'#title' => t('Include Create links for Content Types'),
'#options' => $type_options,
'#default_value' => $type_defaults,
);
return $form;
}