You are here

function biblio_admin_io_mapper_form in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 includes/biblio.admin.inc \biblio_admin_io_mapper_form()
  2. 7.2 includes/biblio.admin.inc \biblio_admin_io_mapper_form()

Parameters

$format:

$exportable:

Return value

Ambigous <multitype:string multitype:string NULL , multitype:number multitype:string multitype:string Ambigous <> Ambigous <string, unknown> , multitype:string >

2 string references to 'biblio_admin_io_mapper_form'
biblio_citeproc_menu in modules/CiteProc/biblio_citeproc.module
biblio_menu in ./biblio.module
Implements hook_menu().

File

includes/biblio.admin.inc, line 1135
biblio.admin.inc

Code

function biblio_admin_io_mapper_form($form, $form_state, $format, $exportable = TRUE) {
  $formats = module_invoke_all('biblio_mapper_options');
  $form = array();
  if (isset($formats[$format])) {
    $form['title'] = array(
      '#prefix' => '<h3>',
      '#markup' => check_plain($formats[$format]['title']) . ' ' . t('file format mapping'),
      '#suffix' => '</h3>',
    );
    $form['fileformat_title'] = array(
      '#type' => 'hidden',
      '#value' => $formats[$format]['title'],
    );
  }
  $form['fileformat'] = array(
    '#type' => 'hidden',
    '#value' => $format,
  );
  $form['fileformat_export'] = array(
    '#type' => 'hidden',
    '#value' => isset($formats[$format]['export']) ? $formats[$format]['export'] : $exportable,
  );
  $form['typemap'] = array(
    '#type' => 'fieldset',
    '#title' => t('Publication types'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['typemap']['#theme'] = 'biblio_admin_type_mapper_form';
  $form['typemap']['#tree'] = TRUE;
  $form['typemap'] += biblio_admin_type_mapper_form($format);
  $form['fieldmap'] = array(
    '#type' => 'fieldset',
    '#title' => t('Data fields'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['fieldmap']['#theme'] = 'biblio_admin_field_mapper_form';
  $form['fieldmap']['#tree'] = TRUE;
  $form['fieldmap'] += biblio_admin_field_mapper_form($format, $exportable);
  return $form;
}