You are here

function panels_var_export in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels.module \panels_var_export()
5 calls to panels_var_export()
panels_export_display in ./panels.module
Exports the provided display into portable code.
panels_export_pane in ./panels.module
panels_mini_export in panels_mini/panels_mini.module
Export a mini panel into PHP code for use in import.
panels_page_export in panels_page/panels_page.module
Export a panel page into PHP code for use in import.
panels_views_export in panels_views/panels_views.module
Export a view pane into PHP code.

File

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

Code

function panels_var_export($object, $prefix = '') {
  if (is_array($object) && empty($object)) {
    $output = 'array()';
  }
  else {
    $output = var_export($object, TRUE);
  }
  if ($prefix) {
    $output = str_replace("\n", "\n{$prefix}", $output);
  }
  return $output;
}