function ctools_context_create in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 includes/context.inc \ctools_context_create()
Create a new context object.
Parameters
$type: The type of context to create; this loads a plugin.
$data: The data to put into the context.
$empty: Whether or not this context is specifically empty.
$conf: A configuration structure if this context was created via UI.
Return value
A $context or NULL if one could not be created.
22 calls to ctools_context_create()
- ctools_access_get_loggedin_context in includes/
context.inc - Create a context for the logged in user.
- 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.
File
- includes/
context.inc, line 560 - Contains code related to the ctools system of 'context'.
Code
function ctools_context_create($type, $data = NULL, $conf = FALSE) {
ctools_include('plugins');
if ($function = ctools_plugin_load_function('ctools', 'contexts', $type, 'context')) {
return $function(FALSE, $data, $conf);
}
}