You are here

public function Manager::queueByIds in Taxonomy Term Depth 8.2

Same name and namespace in other branches
  1. 8 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 77

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,
    ]);
  }
  $this
    ->processQueue();
  return TRUE;
}