You are here

function _draggableviews_get_result_index_by_nid in DraggableViews 6

Same name and namespace in other branches
  1. 6.2 draggableviews.inc \_draggableviews_get_result_index_by_nid()
1 call to _draggableviews_get_result_index_by_nid()
_draggableviews_get_hierarchy_depth in ./draggableviews.inc

File

./draggableviews.inc, line 280
Implements preprocess function hook_submit for draggable views

Code

function _draggableviews_get_result_index_by_nid($nid, $result) {
  for ($i = 0; $i < count($result); $i++) {

    // if current nid matches nid we're looking for, return index
    if ($result[$i]->nid == $nid) {
      return $i;
    }
  }
  return FALSE;
}