function tripal_views_integration_export_form

2.x tripal_views_integration_port.inc tripal_views_integration_export_form($form, &$form_state, $setup_id)
1.x tripal_views_integration_port.inc tripal_views_integration_export_form($form_state, $setup_id)

Form: The form to export a particular tripal views integration

No submit is needed since the setup_id is in the path and the export code is rendered based on that

Parameters

$form_state: The state of the form

$setup_id: The tripal views integration setup id

Related topics

1 string reference to 'tripal_views_integration_export_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 21
This file contains the UI to import/export tripal views integration setups between sites

Code

function tripal_views_integration_export_form($form, &$form_state, $setup_id) {
  $form = array();

  $defn_array = tripal_export_views_integration($setup_id);

  $t = var_export($defn_array, TRUE);
  $t = preg_replace("/\n\s+array/", "array", $t); // move array( to previous line
  $t = preg_replace("/true/", "TRUE", $t); // upper case true
  $t = preg_replace("/false/", "FALSE", $t); // upper case false
  $t = preg_replace("/array\(/", "array (", $t); // put a space between array and paren

  $form['export'] = array(
    '#type' => 'textarea',
    '#title' => 'Export',
    '#description' => t('Simply copy the provided export into the Import text area on '
      . 'another tripal views enabled website to port the integration between websites.'),
    '#rows' => 20,
    '#value' => $t,
  );

  return $form;
}