public function TMGMTJobItemUICart::isSourceItemAdded in Translation Management Tool 7
Checks if the source item has been added into the cart.
Parameters
string $plugin: The source plugin.
string $item_type: The source type.
int $source_id: The source id.
Return value
bool If the source item is in the cart.
2 calls to TMGMTJobItemUICart::isSourceItemAdded()
- TMGMTJobItemUICart::addExistingJobItems in ui/includes/ tmgmt_ui.cart.inc 
- Adds existing job items into the cart.
- TMGMTJobItemUICart::addJobItem in ui/includes/ tmgmt_ui.cart.inc 
- Creates a job item and adds it into the cart.
File
- ui/includes/ tmgmt_ui.cart.inc, line 111 
- Contains TMGMTJobItemUICart.
Class
- TMGMTJobItemUICart
- Represents a job item cart.
Code
public function isSourceItemAdded($plugin, $item_type, $source_id) {
  foreach ($this
    ->getJobItemsFromCart() as $job_item) {
    if ($job_item->item_id == $source_id && $job_item->item_type == $item_type && $job_item->plugin == $plugin) {
      return TRUE;
    }
  }
  return FALSE;
}