function _entityqueue_smartqueue_get_queues in Entityqueue 8
Gets the smartqueues that are configured for an entity type.
Parameters
string $entity_type_id: The ID of the target entity type to check for.
Return value
\Drupal\entityqueue\EntityQueueInterface[] An array of queue entities that are using the 'smartqueue' handler.
3 calls to _entityqueue_smartqueue_get_queues()
- entityqueue_smartqueue_entity_delete in modules/
entityqueue_smartqueue/ entityqueue_smartqueue.module - Implements hook_entity_delete().
- entityqueue_smartqueue_entity_insert in modules/
entityqueue_smartqueue/ entityqueue_smartqueue.module - Implements hook_entity_insert().
- entityqueue_smartqueue_entity_update in modules/
entityqueue_smartqueue/ entityqueue_smartqueue.module - Implements hook_entity_update().
File
- modules/
entityqueue_smartqueue/ entityqueue_smartqueue.module, line 133 - Provides automated subqueues for each entity of a given entity type.
Code
function _entityqueue_smartqueue_get_queues($entity_type_id) {
/** @var \Drupal\entityqueue\EntityQueueInterface[] $queues */
$queues = \Drupal::entityTypeManager()
->getStorage('entity_queue')
->loadByProperties([
'handler' => 'smartqueue',
'handler_configuration.entity_type' => $entity_type_id,
]);
return $queues;
}