You are here

function smartqueue_taxonomy_nodequeue_form in Nodequeue 5.2

Same name and namespace in other branches
  1. 6.2 smartqueue.module \smartqueue_taxonomy_nodequeue_form()
  2. 7.3 smartqueue.module \smartqueue_taxonomy_nodequeue_form()
  3. 7.2 modules/smartqueue/smartqueue.module \smartqueue_taxonomy_nodequeue_form()

Implementation of hook_nodequeue()

File

./smartqueue.module, line 16

Code

function smartqueue_taxonomy_nodequeue_form($queue, &$form) {
  foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) {
    $options[$vid] = check_plain($vocabulary->name);
  }
  $form['placeholder']['vocabularies'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Vocabularies'),
    '#description' => t('Select which vocabularies to use; each unique combination of terms from all of these vocabularies will have a subqueue.'),
    '#options' => $options,
  );
  $form['subqueue_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Subqueue title'),
    '#default_value' => $queue->subqueue_title,
    '#size' => 50,
    '#maxlength' => 64,
    '#description' => t('What to display for the subqueue title; use %subqueue to embed the actual subqueue title. This is used to distinguish multiple nodequeues with subqueues from each other, as internal subqueue title is filled automatically.'),
  );
  if ($queue->qid) {
    $form['placeholder']['vocabularies']['#disabled'] = TRUE;
    $form['placeholder']['vocabularies']['#default_value'] = explode('-', $queue->reference);
  }
}