You are here

function entityqueue_get_entityqueue_sort in Entityqueue 7

Get the entityqueue position sort of a view if there is one and return its ID. If there are multiple of these sorts the first is returned.

Parameters

$view: The view object.

Return value

The ID of the sort or FALSE if there isn't one.

1 call to entityqueue_get_entityqueue_sort()
entityqueue_contextual_links_view_alter in ./entityqueue.module
Implements hook_contextual_links_view_alter().

File

./entityqueue.module, line 676
Allows users to collect entities in arbitrarily ordered lists.

Code

function entityqueue_get_entityqueue_sort($view) {
  foreach ($view->sort as $id => $sort) {
    if ($sort->definition['handler'] == 'entityqueue_handler_sort_position') {
      return $id;
    }
  }
  return FALSE;
}