You are here

function pager_entries_by_val in Custom Pagers 5

Same name and namespace in other branches
  1. 6 custom_pagers.module \pager_entries_by_val()
  2. 7 custom_pagers.module \pager_entries_by_val()
1 call to pager_entries_by_val()
custom_pager_build_nav in ./custom_pagers.module

File

./custom_pagers.module, line 480

Code

function pager_entries_by_val($value, $list) {
  $list = array_values($list);
  foreach ($list as $k => $v) {
    if ($v == $value) {
      $key = $k;
    }
  }
  if (!isset($key)) {
    $key = -1;
  }
  return pager_entries_by_key($key, $list);
}