function context_unpack_context in Context 6.2
Same name and namespace in other branches
- 6 context.module \context_unpack_context()
Helper function to unpack a context object that has been retrieved from the database. @TODO: Remove this once ->conditions and ->reactions issue has been resolved.
2 calls to context_unpack_context()
- context_contexts in ./
context.module - Provides an array of all contexts provided by modules and in the database.
- context_load_context in ./
context.module - Context loader.
File
- ./
context.module, line 308
Code
function context_unpack_context($context) {
if (!empty($context->data)) {
$data = unserialize($context->data);
foreach ($data as $k => $v) {
$context->{$k} = $v;
}
unset($context->data);
}
return $context;
}