You are here

function views_ui_export_page in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 includes/admin.inc \views_ui_export_page()

Export a view for cut & paste.

1 string reference to 'views_ui_export_page'
views_ui_menu in ./views_ui.module

File

includes/admin.inc, line 772
admin.inc Provides the Views' administrative interface.

Code

function views_ui_export_page(&$form_state, $view) {
  $code = $view
    ->export();
  $lines = substr_count($code, "\n");
  $form['code'] = array(
    '#type' => 'textarea',
    '#title' => $view->name,
    '#default_value' => $code,
    '#rows' => $lines,
  );
  return $form;
}