public function JobItemCart::addExistingJobItems in Translation Management Tool 8
Adds existing job items into the cart.
Parameters
\Drupal\tmgmt\JobItemInterface[] $items: Job items to be added.
File
- src/
JobItemCart.php, line 47
Class
- JobItemCart
- Represents a job item cart.
Namespace
Drupal\tmgmtCode
public function addExistingJobItems(array $items) {
foreach ($items as $item) {
if (!$this
->isSourceItemAdded($item
->getPlugin(), $item
->getItemType(), $item
->getItemId())) {
$this->cart[] = $item
->id();
}
}
}