You are here

function panels_export_pane in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels.module \panels_export_pane()
1 call to panels_export_pane()
panels_export_display in ./panels.module
Exports the provided display into portable code.

File

./panels.module, line 876
panels.module Core API for Panels. Provides display editing and rendering capabilities.

Code

function panels_export_pane($pane, $prefix = '') {
  $output = '';
  $output = $prefix . '$pane = new stdClass()' . ";\n";
  $fields = array(
    'pid',
    'panel',
    'type',
    'subtype',
    'shown',
    'access',
    'visibility',
    'configuration',
    'cache',
  );
  foreach ($fields as $field) {
    $output .= "{$prefix}  " . '$pane->' . $field . ' = ' . panels_var_export($pane->{$field}, "{$prefix}  ") . ";\n";
  }
  return $output;
}