function ctools_user_category_edit_form_from_user_context
Return a new context based on an existing context.
1 string reference to 'ctools_user_category_edit_form_from_user_context'
- user_category_edit_form_from_user.inc in plugins/
relationships/ user_category_edit_form_from_user.inc - Plugin to provide an relationship handler for term from node.
File
-
plugins/
relationships/ user_category_edit_form_from_user.inc, line 25
Code
function ctools_user_category_edit_form_from_user_context($context, $conf) {
if (empty($context->data)) {
return ctools_context_create_empty('user_edit_form', NULL);
}
if (!empty($conf['category'])) {
return ctools_context_create('user_edit_form', $context->data, array(
'category' => $conf['category'],
));
}
if (isset($context->data->user_category)) {
return ctools_context_create('user_edit_form', $context->data, array(
'category' => $context->data->user_category,
));
}
return ctools_context_create('user_edit_form', $context->data);
}