function simplecontext_convert
Convert a context into a string to be used as a keyword by content types, etc.
1 string reference to 'simplecontext_convert'
- simplecontext.inc in ctools_plugin_example/
plugins/ contexts/ simplecontext.inc - Sample ctools context type plugin that shows how to create a context from an arg.
File
-
ctools_plugin_example/
plugins/ contexts/ simplecontext.inc, line 121
Code
function simplecontext_convert($context, $type) {
switch ($type) {
case 'item1':
return $context->data->item1;
case 'item2':
return $context->data->item2;
case 'description':
return $context->data->description;
}
}