You are here

function panels_mini_edit_export in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels_mini/panels_mini.module \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 in panels_mini/panels_mini.admin.inc
Implementation of hook_menu().

File

panels_mini/panels_mini.admin.inc, line 272
Administrative items for the panels mini module.

Code

function panels_mini_edit_export(&$form_state, $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;
}