function entityqueue_get_handler in Entityqueue 7
Gets the handler for a given queue.
Parameters
EntityQueue $queue: An EntityQueue object.
Return value
3 calls to entityqueue_get_handler()
- entityqueue_subqueue_delete_form in includes/
entityqueue.admin.inc - Form callback.
- entityqueue_subqueue_delete_form_submit in includes/
entityqueue.admin.inc - Form submit handler.
- entityqueue_subqueue_edit_form in includes/
entityqueue.admin.inc - Form callback; Displays the subqueue edit form.
File
- ./
entityqueue.module, line 46 - Allows users to collect entities in arbitrarily ordered lists.
Code
function entityqueue_get_handler(EntityQueue $queue) {
$object_cache =& drupal_static(__FUNCTION__);
if (!isset($object_cache[$queue->name])) {
ctools_include('plugins');
$class = ctools_plugin_load_class('entityqueue', 'handler', $queue->handler, 'class');
if (class_exists($class)) {
$object_cache[$queue->name] = call_user_func(array(
$class,
'getInstance',
), $queue);
}
else {
$object_cache[$queue->name] = BrokenEntityQueueHandler::getInstance($queue);
}
}
return $object_cache[$queue->name];
}