function current_search_get_classes in Facet API 7
Same name and namespace in other branches
- 6.3 contrib/current_search/plugins/current_search/item.inc \current_search_get_classes()
- 7.2 contrib/current_search/plugins/current_search/item.inc \current_search_get_classes()
Parses the classes setting into an array of sanitized classes.
Parameters
string $setting: The classes setting passed by the user.
array $data: An optional array of data to pass to token_replace().
Return value
array An array of sanitized classes.
2 calls to current_search_get_classes()
- CurrentSearchItemActive::execute in contrib/
current_search/ plugins/ current_search/ item_active.inc - Implements CurrentSearchItem::execute().
- CurrentSearchItemText::execute in contrib/
current_search/ plugins/ current_search/ item_text.inc - Implements CurrentSearchItem::execute().
File
- contrib/
current_search/ plugins/ current_search/ item.inc, line 329 - Base current search item plugin class.
Code
function current_search_get_classes($setting, array $data = array()) {
$classes = array();
foreach (drupal_explode_tags($setting) as $class) {
if ($data) {
$class = token_replace($class, $data);
}
$classes[] = drupal_html_class($class);
}
return $classes;
}