You are here

public function SearchApiFederatedSolrRemap::configurationForm in Search API Federated Solr 7

Same name and namespace in other branches
  1. 7.3 src/SearchApiFederatedSolrRemap.php \SearchApiFederatedSolrRemap::configurationForm()
  2. 7.2 src/SearchApiFederatedSolrRemap.php \SearchApiFederatedSolrRemap::configurationForm()

Implements SearchApiAlterCallbackInterface::configurationForm().

Overrides SearchApiAbstractAlterCallback::configurationForm

File

src/SearchApiFederatedSolrRemap.php, line 41

Class

SearchApiFederatedSolrRemap
Class SearchApiFederatedSolrRemap Provides a Search API index data alteration that remaps property names for indexed items.

Code

public function configurationForm() {
  $form['remap'] = [
    '#type' => 'fieldset',
    '#title' => t('Remap properties'),
  ];
  foreach ($this
    ->federatedFields() as $k => $field) {
    $form['remap'][$k] = [
      '#type' => 'select',
      '#title' => $field['name'],
      '#options' => $this
        ->indexFieldOptions(),
      '#default_value' => isset($this->options['remap'][$k]) ? $this->options['remap'][$k] : '',
    ];
  }
  return $form;
}