function apachesolr_facetcount_form in Apache Solr Search 5
Same name and namespace in other branches
- 5.2 apachesolr.module \apachesolr_facetcount_form()
- 6 apachesolr.module \apachesolr_facetcount_form()
- 6.2 apachesolr.module \apachesolr_facetcount_form()
Used by the 'configure' $op of hook_block so that modules can generically set facet limits on their blocks.
3 calls to apachesolr_facetcount_form()
- apachesolr_block in ./
apachesolr.module - Implementation of hook_block().
- apachesolr_multisitesearch_block in contrib/
apachesolr_multisitesearch/ apachesolr_multisitesearch.module - Implementation of hook_block().
- apachesolr_search_block in ./
apachesolr_search.module - Implementation of hook_block().
File
- ./
apachesolr.module, line 653 - Integration with the Apache Solr search application.
Code
function apachesolr_facetcount_form($delta) {
$facet_query_limits = variable_get('apachesolr_facet_query_limits', array());
// If the block is not 'sort' (and therefore is a facet block),
// display facet limit option.
$form['apachesolr_facet_query_limit'] = array(
'#type' => 'textfield',
'#title' => t('Facet Query Limit'),
'#required' => TRUE,
'#description' => t('The number of facet links to show in this block. Set to -1 for unlimited. Default is 10.'),
'#default_value' => isset($facet_query_limits[$delta]) ? $facet_query_limits[$delta] : 10,
);
return $form;
}