function spaces_preset_export in Spaces 7
Same name and namespace in other branches
- 6.3 spaces.module \spaces_preset_export()
- 6 spaces_admin.inc \spaces_preset_export()
- 6.2 spaces_admin.inc \spaces_preset_export()
- 7.3 spaces.module \spaces_preset_export()
CTools export function.
1 string reference to 'spaces_preset_export'
- spaces_schema in ./
spaces.install - Implements hook_schema().
File
- ./
spaces.module, line 322
Code
function spaces_preset_export($object, $indent = '') {
$output = ctools_export_object('spaces_presets', $object, $indent);
$translatables = array();
foreach (array(
'title',
'description',
) as $key) {
if (!empty($object->{$key})) {
$translatables[] = $object->{$key};
}
}
$translatables = array_filter(array_unique($translatables));
if (!empty($translatables)) {
$output .= "\n";
$output .= "{$indent}// Translatables\n";
$output .= "{$indent}// Included for use with string extractors like potx.\n";
sort($translatables);
foreach ($translatables as $string) {
$output .= "{$indent}t(" . ctools_var_export($string) . ");\n";
}
}
return $output;
}