You are here

public static function ServerForm::buildAjaxBackendConfigForm in Search API 8

Handles switching the selected backend plugin.

Parameters

array $form: The current form array.

\Drupal\Core\Form\FormStateInterface $form_state: The current form state.

Return value

array The part of the form to return as AJAX.

File

src/Form/ServerForm.php, line 254

Class

ServerForm
Provides a form for creating and editing search servers.

Namespace

Drupal\search_api\Form

Code

public static function buildAjaxBackendConfigForm(array $form, FormStateInterface $form_state) {

  // The work is already done in form(), where we rebuild the entity according
  // to the current form values and then create the backend configuration form
  // based on that. So we just need to return the relevant part of the form
  // here.
  return $form['backend_config'];
}