You are here

function cmis_sync_admin_settings in CMIS API 6

Implementation of admin_settings pseudo hook

1 string reference to 'cmis_sync_admin_settings'
cmis_sync_menu in cmis_sync/cmis_sync.module
Implementation of hook_menu() for CMIS sync module.

File

cmis_sync/cmis_sync.module, line 113

Code

function cmis_sync_admin_settings() {
  $form['cmis_sync_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('CMIS Sync'),
    '#description' => t('Settings for cmis sync'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['cmis_sync_settings']['cmis_sync_root_folder'] = array(
    '#type' => 'textfield',
    '#title' => t('CMIS folder'),
    '#default_value' => variable_get('cmis_sync_root_folder', null),
    '#autocomplete_path' => 'cmis/autocomplete',
    '#description' => t('CMIS folder to which drupal content is syncronized.'),
  );
  $cmis_sync_defaults = array(
    '#type' => 'fieldset',
    '#title' => t('Default settings for CMIS nodes created by the sync process'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#weight' => 20,
  );
  $cmis_sync_defaults['cmis_sync_node_type'] = array(
    '#type' => 'select',
    '#title' => t('Type'),
    '#options' => node_get_types('names'),
    '#default_value' => variable_get('cmis_sync_node_type', 'story'),
  );
  $cmis_sync_defaults['cmis_sync_node_status'] = array(
    '#type' => 'checkbox',
    '#title' => t('Published'),
    '#default_value' => variable_get('cmis_sync_node_status', 1),
  );
  $cmis_sync_defaults['cmis_sync_node_promote'] = array(
    '#type' => 'checkbox',
    '#title' => t('Promote to front page'),
    '#default_value' => variable_get('cmis_sync_node_promote', 1),
  );
  $cmis_sync_defaults['cmis_sync_node_sticky'] = array(
    '#type' => 'checkbox',
    '#title' => t('Sticky'),
    '#default_value' => variable_get('cmis_sync_node_sticky', 0),
  );
  $form['cmis_sync_settings']['cmis_sync_node'] = $cmis_sync_defaults;
  return system_settings_form($form);
}