You are here

function ctools_context_term_settings_form_submit in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 plugins/contexts/term.inc \ctools_context_term_settings_form_submit()

File

plugins/contexts/term.inc, line 139
Plugin to provide a term context.

Code

function ctools_context_term_settings_form_submit($form, &$form_state) {
  if ($form_state['values']['set_identifier']) {
    $term = db_query('SELECT tid, name FROM {taxonomy_term_data} WHERE LOWER(tid) = :tid', array(
      ':tid' => $form_state['values']['tid'],
    ))
      ->fetchObject();
    $form_state['values']['identifier'] = $term->name;
  }
  $form_state['conf']['tid'] = $form_state['values']['tid'];
  $form_state['conf']['vid'] = $form_state['values']['vid'];
}