function sweaver_export_check_serialized_keys in Sweaver 7
Same name and namespace in other branches
- 6 sweaver.module \sweaver_export_check_serialized_keys()
Check if we have a serialized key. If so convert it to an array.
Parameters
$object: A sweaver object.
5 calls to sweaver_export_check_serialized_keys()
- sweaver_export_sweaver_object in ./
sweaver.module - CTools object export function.
- sweaver_plugin_editor::sweaver_form in plugins/
sweaver_plugin_editor/ sweaver_plugin_editor.inc - Frontend form.
- sweaver_plugin_editor::sweaver_form_css_js in plugins/
sweaver_plugin_editor/ sweaver_plugin_editor.inc - Frontend css and js.
- sweaver_property_form in plugins/
sweaver_plugin_editor/ sweaver_plugin_editor.admin.inc - Property new/edit form.
- sweaver_type_form in plugins/
sweaver_plugin_editor/ sweaver_plugin_editor.admin.inc - Type new/edit form.
File
- ./
sweaver.module, line 200 - Sweaver functions.
Code
function sweaver_export_check_serialized_keys($object) {
if (isset($object->table)) {
$object_type = str_replace('sweaver_', '', $object->table);
$key = $object_type . '_options';
if (isset($object->{$key}) && !empty($object->{$key}) && is_string($object->{$key})) {
$object->{$key} = unserialize($object->{$key});
}
}
}