function simplecontext_convert in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 ctools_plugin_example/plugins/contexts/simplecontext.inc \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 - Sample ctools context type plugin that shows how to create a context from an arg.
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;
}
}