You are here

function export_settings in Node export 5

Same name and namespace in other branches
  1. 5.2 export.pages.inc \export_settings()
  2. 6 export.pages.inc \export_settings()

menu callback to configure module settings.

1 string reference to 'export_settings'
export_menu in ./export.module
Implementation of hook_menu().

File

./export.module, line 87

Code

function export_settings() {
  $form['heading'] = array(
    '#value' => '<b>' . t('Configuration options for the export module:') . '</b>',
  );
  $form['publishing'] = array(
    '#type' => 'fieldset',
    '#title' => t('Should the publishing options ( e.g. published, promoted, etc) be reset to the defaults?'),
  );
  $types = node_get_types('names');
  foreach ($types as $type => $name) {
    $form['publishing']['export_reset_' . $type] = array(
      '#type' => 'checkbox',
      '#title' => t('@s: reset publishing options when exportd', array(
        '@s' => $name,
      )),
      '#default_value' => variable_get('export_reset_' . $type, FALSE),
    );
  }

  // Need the variable default key to be something that's never a valid node type.
  $types = array_merge(array(
    '!' => "<" . t("none") . ">",
  ), $types);
  $form['export_omitted'] = array(
    '#type' => 'select',
    '#title' => t('Omitted content types'),
    '#default_value' => variable_get('export_omitted', array(
      '!',
    )),
    '#options' => $types,
    '#description' => t('Select any node types which should <em>never</em> be exportd. Typically you should will want to select here all node types for which cloning fails (e.g. image nodes).'),
    '#multiple' => TRUE,
  );
  $form['export_method'] = array(
    '#type' => 'value',
    '#value' => 'prepopulate',
  );
  return system_settings_form($form);
}