function ctools_terms_from_node_settings_form

Settings form for the relationship.

1 string reference to 'ctools_terms_from_node_settings_form'
terms_from_node.inc in plugins/relationships/terms_from_node.inc
Plugin to provide an relationship handler for all terms from node.

File

plugins/relationships/terms_from_node.inc, line 73

Code

function ctools_terms_from_node_settings_form($form, &$form_state) {
    $conf = $form_state['conf'];
    $options = array();
    foreach (taxonomy_vocabulary_get_names() as $name => $vocabulary) {
        $options[$name] = $vocabulary->name;
    }
    $form['vocabulary'] = array(
        '#title' => t('Vocabulary'),
        '#type' => 'checkboxes',
        '#options' => $options,
        '#default_value' => $conf['vocabulary'],
        '#prefix' => '<div class="clearfix">',
        '#suffix' => '</div>',
    );
    $form['concatenator'] = array(
        '#title' => t('Concatenator'),
        '#type' => 'select',
        '#options' => array(
            ',' => ', (AND)',
            '+' => '+ (OR)',
        ),
        '#default_value' => $conf['concatenator'],
        '#prefix' => '<div class="clearfix">',
        '#suffix' => '</div>',
        '#description' => t("When the value from this context is passed on to a view as argument, the terms can be concatenated in the form of 1+2+3 (for OR) or 1,2,3 (for AND)."),
    );
    return $form;
}