Checks if the source item has been added into the cart.
string $plugin: The source plugin.
string $item_type: The source type.
int $source_id: The source id.
bool If the source item is in the cart.
public function isSourceItemAdded($plugin, $item_type, $source_id) {
foreach ($this
->getJobItemsFromCart() as $job_item) {
if ($job_item
->getItemId() == $source_id && $job_item
->getItemType() == $item_type && $job_item
->getPlugin() == $plugin) {
return TRUE;
}
}
return FALSE;
}