You are here

function apachesolr_environment_delete_form in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 apachesolr.admin.inc \apachesolr_environment_delete_form()
  2. 7 apachesolr.admin.inc \apachesolr_environment_delete_form()

Form to delete a search environment

_state

Parameters

array $form:

array $environment:

Return value

array output of confirm_form()

1 string reference to 'apachesolr_environment_delete_form'
apachesolr_menu in ./apachesolr.module
Implements hook_menu().

File

./apachesolr.admin.inc, line 17
Administrative pages for the Apache Solr framework.

Code

function apachesolr_environment_delete_form(array $form, array &$form_state, array $environment) {
  $form['env_id'] = array(
    '#type' => 'value',
    '#value' => $environment['env_id'],
  );
  if (isset($environment['export_type']) && $environment['export_type'] == 3) {
    $verb = t('Revert');
  }
  else {
    $verb = t('Delete');
  }
  return confirm_form($form, t('Are you sure you want to !verb search environment %name?', array(
    '%name' => $environment['name'],
    '!verb' => strtolower($verb),
  )), 'admin/config/search/apachesolr', t('This action cannot be undone.'), $verb, t('Cancel'));
}