function panels_var_export in Panels 6.2
Same name and namespace in other branches
- 5.2 panels.module \panels_var_export()
Related topics
4 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.write.inc - Export a panel page into PHP code for use in import.
File
- ./
panels.module, line 839 - panels.module
Code
function panels_var_export($object, $prefix = '') {
if (is_array($object) && empty($object)) {
$output = 'array()';
}
else {
// Remove extra space to match Drupal coding standards.
$output = str_replace('array (', 'array(', var_export($object, TRUE));
}
if ($prefix) {
$output = str_replace("\n", "\n{$prefix}", $output);
}
return $output;
}