You are here

public function Manager::queueByIds in Taxonomy Term Depth 8

Same name and namespace in other branches
  1. 8.2 src/QueueManager/Manager.php \Drupal\taxonomy_term_depth\QueueManager\Manager::queueByIds()
1 call to Manager::queueByIds()
Manager::queueBatch in src/QueueManager/Manager.php

File

src/QueueManager/Manager.php, line 83
Manages queue operations.

Class

Manager

Namespace

Drupal\taxonomy_term_depth\QueueManager

Code

public function queueByIds($ids) {
  if (empty($ids)) {
    return FALSE;
  }
  $this
    ->clearDepths($ids);
  foreach ($ids as $tid) {
    $this->queue
      ->createItem([
      'tid' => $tid,
    ]);
  }
  return TRUE;
}