You are here

function tmgmt_job_item_create in Translation Management Tool 7

Same name and namespace in other branches
  1. 8 tmgmt.module \tmgmt_job_item_create()

Creates a translation job item.

Parameters

$plugin: The plugin name.

$item_type: The source item type.

$item_id: The source item id.

$values: (Optional) An array of additional entity values to be set.

Return value

TMGMTJobItem The created, not yet saved, job item entity.

Related topics

9 calls to tmgmt_job_item_create()
hook_tmgmt_source_suggestions in ./tmgmt.api.php
Return a list of suggested sources for job items.
TMGMTCRUDTestCase::testJobItemsCounters in tests/tmgmt.crud.test
Test the calculations of the counters.
TMGMTJob::addItem in entity/tmgmt.entity.job.inc
Adds an item to the translation job.
TMGMTJobItemUICart::addJobItem in ui/includes/tmgmt_ui.cart.inc
Creates a job item and adds it into the cart.
TMGMTUITestCase::testCart in ui/tmgmt_ui.test
Test the cart functionality.

... See full list

File

./tmgmt.module, line 770
Main module file for the Translation Management module.

Code

function tmgmt_job_item_create($plugin, $item_type, $item_id, array $values = array()) {
  return entity_create('tmgmt_job_item', array_merge($values, array(
    'plugin' => $plugin,
    'item_type' => $item_type,
    'item_id' => $item_id,
  )));
}