public static function SuggestionHelper::srcBits in Autocomplete Search Suggestions 7
Build an array of defalut options from bitmaps.
Parameters
int $src: The ngrams source bitmap.
Return value
array An array of default option.
1 call to SuggestionHelper::srcBits()
- suggestion_admin_edit_form in ./
suggestion.admin.inc - Menu callback to index suggestions.
File
- src/
SuggestionHelper.php, line 248 - Helper methods for the suggestion module.
Class
- SuggestionHelper
- Provides helper methods for suggestions.
Code
public static function srcBits($src = 0) {
$bits = array();
if (intval($src) <= 0) {
return array(
0,
);
}
foreach (array_keys(SuggestionStorage::getSrcOptions()) as $bit) {
if ($bit & $src) {
$bits[] = $bit;
}
}
return $bits;
}