public function CurrentSearchItemActive::settingsForm in Facet API 7.2
Same name and namespace in other branches
- 6.3 contrib/current_search/plugins/current_search/item_active.inc \CurrentSearchItemActive::settingsForm()
- 7 contrib/current_search/plugins/current_search/item_active.inc \CurrentSearchItemActive::settingsForm()
Implements CurrentSearchItem::settingsForm().
Overrides CurrentSearchItem::settingsForm
File
- contrib/
current_search/ plugins/ current_search/ item_active.inc, line 76 - The active current search item plugin class.
Class
- CurrentSearchItemActive
- Current search item plugin that displays the active facet items.
Code
public function settingsForm(&$form, &$form_state) {
$form['pattern'] = array(
'#type' => 'textfield',
'#title' => t('Pattern'),
'#default_value' => $this->settings['pattern'],
'#description' => t('The pattern used to render active items in the list. Token replacement patterns are allowed.'),
'#maxlength' => 255,
);
$form['keys'] = array(
'#type' => 'checkbox',
'#title' => t('Append the keywords passed by the user to the list'),
'#default_value' => $this->settings['keys'],
);
$form['css'] = array(
'#type' => 'checkbox',
'#title' => t('Add CSS classes to wrapper element'),
'#default_value' => $this->settings['css'],
);
$form['classes'] = array(
'#type' => 'textfield',
'#title' => t('CSS classes'),
'#default_value' => $this->settings['classes'],
'#description' => t('A comma separated list of CSS classes.'),
'#maxlength' => 128,
'#states' => array(
'visible' => array(
':input[name="plugin_settings[' . $this->name . '][css]"]' => array(
'checked' => TRUE,
),
),
),
);
$form['nofollow'] = array(
'#type' => 'checkbox',
'#title' => t('Prevent crawlers from following active item links'),
'#default_value' => $this->settings['nofollow'],
'#description' => t('Add the <code>rel="nofollow"</code> attribute to active item links to maximize SEO by preventing crawlers from indexing duplicate content and getting stuck in loops.'),
);
// Adds token tree.
$form['tokens'] = $this
->getTokenTree(array(
'facetapi_active',
));
}