You are here

function _suggestion_admin_src_bits in Autocomplete Search Suggestions 7

Build an array of defalut options from bitmaps.

Parameters

int $src: The title to index.

array $options: An array of the available options.

Return value

array An array of default option.

File

./suggestion.admin.inc, line 463
Administration form for suggestion module.

Code

function _suggestion_admin_src_bits($src = 0, array $options = array()) {
  $bits = array();
  if (intval($src) <= 0) {
    return array(
      0,
    );
  }
  foreach (array_keys($options) as $bit) {
    if ($bit & $src) {
      $bits[] = $bit;
    }
  }
  return $bits;
}