function apachesolr_index_config_form in Apache Solr Search 6.3
Same name and namespace in other branches
- 8 apachesolr.admin.inc \apachesolr_index_config_form()
- 7 apachesolr.admin.inc \apachesolr_index_config_form()
Form builder for the bundle configuration form.
See also
apachesolr_index_config_form_submit().
1 string reference to 'apachesolr_index_config_form'
- apachesolr_status_page in ./
apachesolr.admin.inc - Gets information about the fields already in solr index.
File
- ./
apachesolr.admin.inc, line 1167 - Administrative pages for the Apache Solr framework.
Code
function apachesolr_index_config_form(&$form_state, $env_id) {
$form = array();
$form['config'] = array(
'#type' => 'fieldset',
'#title' => t('Configuration'),
'#collapsible' => TRUE,
);
$form['config']['bundles'] = array(
'#type' => 'markup',
'#value' => t('Select the content types that should be indexed.'),
);
// For future extensibility, when we have multiple cores.
$form['config']['env_id'] = array(
'#type' => 'value',
'#value' => $env_id,
);
$options = array();
foreach (content_types() as $key => $info) {
$options[$key] = $info['name'];
}
asort($options);
$form['config']['entities']['#tree'] = TRUE;
$form['config']['entities']['node'] = array(
'#type' => 'checkboxes',
'#title' => 'node',
'#options' => $options,
'#default_value' => apachesolr_get_index_bundles($env_id, 'node'),
);
$form['config']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}