function spaces_preset_export in Spaces 6.3
Same name and namespace in other branches
- 6 spaces_admin.inc \spaces_preset_export()
- 6.2 spaces_admin.inc \spaces_preset_export()
- 7.3 spaces.module \spaces_preset_export()
- 7 spaces.module \spaces_preset_export()
CTools export function.
1 string reference to 'spaces_preset_export'
- spaces_schema in ./
spaces.install - Implementation of hook_schema()
File
- ./
spaces.module, line 318
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;
}