function apachesolr_multilingual_add_settings_form_elements in Apache Solr Multilingual 7
Same name and namespace in other branches
- 6.3 apachesolr_multilingual.module \apachesolr_multilingual_add_settings_form_elements()
2 calls to apachesolr_multilingual_add_settings_form_elements()
- apachesolr_multilingual_form_apachesolr_search_page_settings_form_alter in ./
apachesolr_multilingual.module - Implements hook_form_alter().
- apachesolr_multilingual_form_block_admin_configure_alter in ./
apachesolr_multilingual.module - Add multilingual settings to MLT blocks.
File
- ./
apachesolr_multilingual.module, line 716 - Multilingual search using Apache Solr.
Code
function apachesolr_multilingual_add_settings_form_elements(&$form, $settings) {
$form['apachesolr_multilingual_query_settings'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
'#title' => t('Multilingual Query Settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['apachesolr_multilingual_query_settings']['apachesolr_multilingual_auto_language_filter'] = array(
'#type' => 'checkbox',
'#title' => t('Limit search to current language by default'),
'#default_value' => $settings['apachesolr_multilingual_auto_language_filter'],
'#description' => t('Show only search results that match the current language.'),
);
if (array_key_exists('apachesolr_multilingual_auto_language_filter_detachable', $settings)) {
$form['apachesolr_multilingual_query_settings']['apachesolr_multilingual_auto_language_filter_detachable'] = array(
'#type' => 'checkbox',
'#title' => t('Limit search to current language could be disabled by user'),
'#default_value' => $settings['apachesolr_multilingual_auto_language_filter_detachable'],
'#description' => t('Displays a checkbox on search result page to search over all languages if "%limit_search" is active.', array(
'%limit_search' => t('Limit search to current language by default'),
)),
);
}
$form['apachesolr_multilingual_query_settings']['apachesolr_multilingual_show_language_undefined_results'] = array(
'#type' => 'checkbox',
'#title' => t('Show language-neutral/undefined results by default'),
'#default_value' => $settings['apachesolr_multilingual_show_language_undefined_results'],
'#description' => t('Show language-neutral/undefined results on search result page if "%limit_search" is active.', array(
'%limit_search' => t('Limit search to current language by default'),
)),
);
}