You are here

function panels_page_edit_export in Panels 5.2

Page callback to export a panel page to PHP code.

1 string reference to 'panels_page_edit_export'
panels_page_admin_menu_items in panels_page/panels_page.module
Helper function to add a menu item for a panel.

File

panels_page/panels_page.admin.inc, line 801
panels_page.admin.inc

Code

function panels_page_edit_export($panel_page) {
  if (!is_object($panel_page)) {
    $panel_page = panels_page_load($panel_page);
  }
  drupal_set_title(check_plain($panel_page->title));
  $code = panels_page_export($panel_page);
  $lines = substr_count($code, "\n");
  $form['code'] = array(
    '#type' => 'textarea',
    '#title' => $panel_page->title,
    '#default_value' => $code,
    '#rows' => $lines,
  );
  return $form;
}