function ctools_context_id in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 includes/context.inc \ctools_context_id()
Determine a unique context ID for a context
Often contexts of many different types will be placed into a list. This ensures that even though contexts of multiple types may share IDs, they are unique in the final list.
4 calls to ctools_context_id()
- ctools_context_get_context_from_argument in includes/
context.inc - Get a context from an argument.
- ctools_context_get_context_from_arguments in includes/
context.inc - Load the contexts for a given list of arguments.
- ctools_context_get_context_from_relationships in includes/
context.inc - Fetch all active relationships
- ctools_context_handler_render in includes/
context-task-handler.inc - Render a context type task handler given a list of handlers attached to a type.
File
- includes/
context.inc, line 659 - Contains code related to the ctools system of 'context'.
Code
function ctools_context_id($context, $type = 'context') {
if (!$context['id']) {
$context['id'] = 1;
}
return $type . '_' . $context['name'] . '_' . $context['id'];
}