5 * Plugin to provide an relationship handler for term from node.
9 * Plugins are described by creating a $plugin array which will be used
10 * by the system that includes this file.
13 'title' => t('User category edit form from user'),
14 'keyword' => 'user_category_form',
15 'description' => t('Adds user category edit form from a user context.'),
16 'required context' => new ctools_context_required(t('User'), 'user'),
17 'context' => 'ctools_user_category_edit_form_from_user_context',
21 * Return a new context based on an existing context.
23 function ctools_user_category_edit_form_from_user_context($context, $conf) {
24 if (empty($context->data)) {
25 return ctools_context_create_empty('user_edit_form', NULL);
28 if (isset($context->data->user_category)) {
29 return ctools_context_create('user_edit_form', $context->data, array('category' => $context->data->user_category));