You are here

function total_control_node_types_content_type_edit_form in Total Control Admin Dashboard 6.2

Same name and namespace in other branches
  1. 7.2 plugins/content_types/node_types.inc \total_control_node_types_content_type_edit_form()

'Edit form' callback for the content type.

1 string reference to 'total_control_node_types_content_type_edit_form'
node_types.inc in plugins/content_types/node_types.inc
panel_pages.inc

File

plugins/content_types/node_types.inc, line 127
panel_pages.inc

Code

function total_control_node_types_content_type_edit_form(&$form, &$form_state) {
  $conf = $form_state['conf'];
  $types = node_get_types('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;
}