function tripal_views_integration_import_form

2.x tripal_views_integration_port.inc tripal_views_integration_import_form()
1.x tripal_views_integration_port.inc tripal_views_integration_import_form()

Form: Imports a tripal views integration

Related topics

1 string reference to 'tripal_views_integration_import_form'
tripal_views_menu in tripal_views/tripal_views.module
Implements hook_menu(). This hook provides details about new menu items added by this module

File

tripal_views/includes/tripal_views_integration_port.inc, line 49
This file contains the UI to import/export tripal views integration setups between sites

Code

function tripal_views_integration_import_form() {
  $form = array();

  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => 'Name (optional)',
    '#description' => t('A human-readable name for your integration.')
  );

  $priorities = array();
  foreach (range(-10, 10) as $v) {
    $priorities[$v] = (string) $v;
  }
  $form['views_type']['row_priority'] = array(
    '#type' => 'select',
    '#title' => t('Priority (optional)'),
    '#description' => t('The level of priority your Views integration has in relation to the '
      . 'default core and module definitions. The views integration definition with the '
      . 'lightest priority will be used. For example, if there is a definition created by '
      . 'core with a priority of 10 and another by a custom module of 5 and yours is -1 then '
      . 'you definition will be used for that table because -1 is lighter then both 5 and 10.'),
    '#options' => $priorities,
    '#default_value' => -1,
  );

  $form['import'] = array(
    '#type' => 'textarea',
    '#title' => 'Import',
    '#description' => t('Simply copy the provided export into the text area to port the integration between websites.'),
    '#rows' => 20,
  );

  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit'
  );

  return $form;
}