You are here

function panels_views_export_view in Panels 5.2

Page callback to export a view pane.

1 string reference to 'panels_views_export_view'
panels_views_menu in panels_views/panels_views.module
Implementation of hook_menu().

File

panels_views/panels_views.module, line 646
panels_views.module

Code

function panels_views_export_view($pv, $prefix = '') {
  if (!is_object($pv)) {
    $pv = panels_views_load($pv);
  }
  if (empty($pv)) {
    return drupal_not_found();
  }
  drupal_set_title(check_plain($pv->title));
  $code = panels_views_export($pv);
  $lines = substr_count($code, "\n");
  $form['code'] = array(
    '#type' => 'textarea',
    '#title' => $pv->title,
    '#default_value' => $code,
    '#rows' => $lines,
  );
  return $form;
}