You are here

function entityqueue_handler_relationship_entityqueue::options_form in Entityqueue 7

Default options form that provides the label widget that all fields should have.

Overrides views_handler_relationship::options_form

File

includes/views/entityqueue_handler_relationship_entityqueue.inc, line 23
Specialized relationship handler to add entityqueues.

Class

entityqueue_handler_relationship_entityqueue
@file Specialized relationship handler to add entityqueues.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['limit'] = array(
    '#type' => 'checkbox',
    '#title' => t('Limit to one or more queues (recommended)'),
    '#default_value' => $this->options['limit'],
  );
  $views_data = views_fetch_data($this->table);
  $subqueues = entityqueue_subqueue_load_by_target_type($views_data['table']['entity type']);
  $form['queues'] = array(
    '#prefix' => '<div><div id="edit-options-queues">',
    '#suffix' => '</div></div>',
    '#type' => 'checkboxes',
    '#title' => t('Queues'),
    '#options' => entityqueue_get_options($subqueues),
    '#default_value' => $this->options['queues'],
    '#process' => array(
      'form_process_checkboxes',
      'ctools_dependent_process',
    ),
    '#dependency' => array(
      'edit-options-limit' => array(
        TRUE,
      ),
    ),
  );
}