function SearchApiGlossaryWidget::settingsForm in Search API AZ Glossary 7.3
Same name and namespace in other branches
- 7.2 search_api_glossary.module \SearchApiGlossaryWidget::settingsForm()
Overrides FacetapiWidgetLinks::settingsForm().
File
- ./
search_api_glossary.module, line 477 - Search api glossary module file.
Class
Code
function settingsForm(&$form, &$form_state) {
parent::settingsForm($form, $form_state);
// @see http://drupal.org/node/1370342
$form['widget']['widget_settings']['links'][$this->id]['show_all'] = array(
'#type' => 'checkbox',
'#title' => t('Show "all" facet'),
'#default_value' => !empty($this->settings->settings['show_all']),
'#description' => t('Whether to display the "all" facet or not'),
'#states' => array(
'visible' => array(
'select[name="widget"]' => array(
'value' => $this->id,
),
),
),
);
$form['widget']['widget_settings']['links'][$this->id]['show_count'] = array(
'#type' => 'checkbox',
'#title' => t('Show count in facet'),
'#default_value' => !empty($this->settings->settings['show_count']),
'#description' => t('Whether to display count in facet or not'),
'#states' => array(
'visible' => array(
'select[name="widget"]' => array(
'value' => $this->id,
),
),
),
);
}