You are here

function apachesolr_access_form_apachesolr_environment_edit_form_alter in Apache Solr Search 8

Same name and namespace in other branches
  1. 7 apachesolr_access/apachesolr_access.module \apachesolr_access_form_apachesolr_environment_edit_form_alter()

Implements hook_form_FORM_ID_alter().

File

apachesolr_access/apachesolr_access.module, line 160

Code

function apachesolr_access_form_apachesolr_environment_edit_form_alter(&$form, $form_state) {
  $form['conf']['apachesolr_access_always_add_grants'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add access grants even for public content'),
    '#default_value' => empty($form['#environment']['conf']['apachesolr_access_always_add_grants']) ? 0 : 1,
    '#description' => t('Normally should be disabled. Changing this value requires all content to be re-indexed. Useful for sites using Domamin Access or simliar node acess modules with grants that vary for anonymous users.'),
  );
  $form['actions']['save']['#submit'][] = 'apachesolr_access_environment_edit_form_submit';
  $form['actions']['save_edit']['#submit'][] = 'apachesolr_access_environment_edit_form_submit';
}