You are here

function entityqueue_subqueue_load_multiple in Entityqueue 7

Loads multiple subqueues by ID, name or based on a set of matching conditions.

Parameters

array $names: An array of queue names or IDs.

array $conditions: An array of conditions on the {entityqueue_subqueue} table in the form 'field' => $value.

bool $reset: Whether to reset the internal queue loading cache.

Return value

array An array of EntitySubqueue objects, keyed by subuque_id. When no results are found, an empty array is returned.

3 calls to entityqueue_subqueue_load_multiple()
entityqueue_get_options in ./entityqueue.module
Returns all queues or subqueues in a way which can be used on form options.
entityqueue_subqueue_edit_form_validate in includes/entityqueue.admin.inc
Validation callback for the subqueue edit form.
entityqueue_subqueue_load in ./entityqueue.module
Loads a subqueue by name or by ID.

File

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

Code

function entityqueue_subqueue_load_multiple($names = FALSE, $conditions = array(), $reset = FALSE) {
  if (!empty($names) && !is_numeric(reset($names))) {
    $conditions += array(
      'name' => $names,
    );
    $names = FALSE;
  }
  $queues = entity_load('entityqueue_subqueue', $names, $conditions, $reset);
  return !empty($queues) ? $queues : array();
}