You are here

function ctools_context_node_settings_form_submit in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 plugins/contexts/node.inc \ctools_context_node_settings_form_submit()
1 string reference to 'ctools_context_node_settings_form_submit'
node.inc in plugins/contexts/node.inc
Plugin to provide a node context. A node context is a node wrapped in a context object that can be utilized by anything that accepts contexts.

File

plugins/contexts/node.inc, line 151
Plugin to provide a node context. A node context is a node wrapped in a context object that can be utilized by anything that accepts contexts.

Code

function ctools_context_node_settings_form_submit($form, &$form_values, &$form_state) {
  if ($form_values['set_identifier']) {
    $node = node_load($form_values['nid']);
    $form_state['values']['context']['identifier'] = $node->title;
  }

  // Don't let this be stored.
  unset($form_values['set_identifier']);
}