function ctools_context_create_empty in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 includes/context.inc \ctools_context_create_empty()
Create an empty context object.
Empty context objects are primarily used as placeholders in the UI where the actual contents of a context object may not be known. It may have additional text embedded to give the user clues as to how the context is used.
Parameters
$type: The type of context to create; this loads a plugin.
Return value
A $context or NULL if one could not be created.
21 calls to ctools_context_create_empty()
- ctools_argument_nid_context in plugins/
arguments/ nid.inc - Discover if this argument gives us the node we crave.
- ctools_argument_rid_context in plugins/
arguments/ rid.inc - Discover if this argument gives us the node we crave.
- ctools_argument_uid_context in plugins/
arguments/ uid.inc - Discover if this argument gives us the user we crave.
- ctools_argument_user_name_context in plugins/
arguments/ user_name.inc - Discover if this argument gives us the user we crave.
- ctools_book_parent_context in plugins/
relationships/ book_parent.inc - Return a new context based on an existing context.
File
- includes/
context.inc, line 581 - Contains code related to the ctools system of 'context'.
Code
function ctools_context_create_empty($type) {
if ($function = ctools_plugin_load_function('ctools', 'contexts', $type, 'context')) {
$context = $function(TRUE);
if (is_object($context)) {
$context->empty = TRUE;
}
return $context;
}
}