You are here

function ctools_node_edit_form_from_node_context in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 plugins/relationships/node_edit_form_from_node.inc \ctools_node_edit_form_from_node_context()

Return a new context based on an existing context.

1 string reference to 'ctools_node_edit_form_from_node_context'
node_edit_form_from_node.inc in plugins/relationships/node_edit_form_from_node.inc
Plugin to provide an relationship handler for term from node.

File

plugins/relationships/node_edit_form_from_node.inc, line 24
Plugin to provide an relationship handler for term from node.

Code

function ctools_node_edit_form_from_node_context($context, $conf) {
  if (empty($context->data)) {
    return ctools_context_create_empty('node_edit_form', NULL);
  }
  if (isset($context->data->nid)) {
    return ctools_context_create('node_edit_form', $context->data);
  }
}