You are here

function panels_mini_edit_export in Panels 5.2

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

Page callback to export a mini panel to PHP code.

1 string reference to 'panels_mini_edit_export'
panels_mini_menu_items in panels_mini/panels_mini.module

File

panels_mini/panels_mini.module, line 344
panels_mini.module

Code

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