function views_export_export

2.x views_export.module views_export_export()

Page callback to export views in bulk.

1 string reference to 'views_export_export'
views_export_menu in views_export/views_export.module
Implementation of hook_menu().

File

views_export/views_export.module, line 50
views_export.module

Code

function views_export_export() {
  $tags = array();
  if (!empty($_GET['tags'])) {
    $tags = explode(',', $_GET['tags']);
  }

  $exportables = array();
  foreach (module_implements('views_exportables') as $module) {
    $function = $module . '_views_exportables';
    $exportables[$module] = $function('list', $tags);
    asort($exportables[$module]);
  }

  if ($exportables) {
    $form_state = array(
      'no_redirect' => TRUE,
      'exportables' => $exportables,
      'tags' => $tags,
    );

    $output = drupal_build_form('views_export_export_form', $form_state);
    if (!$output) {
      $output = $form_state['output'];
    }
    return $output;
  }
  else {
    return t('There are no views to be exported at this time.');
  }
}