You are here

public function SearchApiGroupingMultivalueField::configurationForm in Search API Grouping 7

Return the settings form for this processor.

Overrides SearchApiAbstractProcessor::configurationForm

File

includes/processor_multivalue_field.inc, line 16
Processor for splitting indexing items on behalf of a multivalue field.

Class

SearchApiGroupingMultivalueField
Processor for splitting up items on behalf of a multivalue field.

Code

public function configurationForm() {
  $form = parent::configurationForm();

  // Re-use but modify the default form element.
  $form['fields']['#type'] = 'select';
  unset($form['fields']['#attributes']);
  $form['fields']['#options'] = array(
    NULL => t('<none>'),
  ) + $form['fields']['#options'];
  $form['split_field'] = $form['fields'];
  $form['fields']['#access'] = FALSE;
  $form['split_field'] = array(
    '#title' => 'The field to use to split the items to index.',
    '#default_value' => isset($this->options['split_field']) ? $this->options['split_field'] : NULL,
  ) + $form['split_field'];
  return $form;
}