You are here

function acquia_search_form_search_api_server_edit_form_alter in Acquia Search 2.x

Same name and namespace in other branches
  1. 3.x acquia_search.module \acquia_search_form_search_api_server_edit_form_alter()

Implements hook_form_FORM_ID_alter().

Display the read-only warning.

File

./acquia_search.module, line 327
Integration between Acquia Drupal and Acquia's hosted solr search service.

Code

function acquia_search_form_search_api_server_edit_form_alter(&$form) {
  $server = Server::load($form['id']['#default_value']);
  if (!$server) {
    return;
  }
  if (!acquia_search_is_acquia_server($server
    ->getBackendConfig())) {
    return;
  }
  if (!acquia_search_should_set_read_only_mode()) {
    return;
  }
  acquia_search_server_show_read_only_mode_warning();
}