function 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
ctools_context A $context or NULL if one could not be created.
29 calls to ctools_context_create_empty()
- ctools_argument_entity_id_context in plugins/
arguments/ entity_id.inc - Discover if this argument gives us the entity we crave.
- 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 997
Code
function ctools_context_create_empty($type) {
$plugin = ctools_get_context($type);
if ($function = ctools_plugin_get_function($plugin, 'context')) {
$context = $function(TRUE, NULL, FALSE, $plugin);
if (is_object($context)) {
$context->empty = TRUE;
}
return $context;
}
}