You are here

public static function SuggestionHelper::optionBits in Autocomplete Search Suggestions 7

Convert an array of submitted form options to a bitmap.

Parameters

array $bits: An array of form options.

Return value

int The option values bitwise OR.

1 call to SuggestionHelper::optionBits()
suggestion_admin_search_form_update_submit in ./suggestion.admin.inc
Ngram update submission function.

File

src/SuggestionHelper.php, line 230
Helper methods for the suggestion module.

Class

SuggestionHelper
Provides helper methods for suggestions.

Code

public static function optionBits(array $bits = array()) {
  $src = 0;
  foreach ($bits as $bit) {
    $src |= intval($bit);
  }
  return $src;
}