You are here

function tmgmt_job_create in Translation Management Tool 7

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

Creates a translation job.

Parameters

$source_language: The source language from which should be translated.

$target_language: The target language into which should be translated.

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

Return value

TMGMTJob The job entity.

Related topics

12 calls to tmgmt_job_create()
TMGMTBaseTestCase::createJob in tests/tmgmt.base.test
Creates, saves and returns a translation job.
TMGMTEntitySourceTestCase::testAddingJobItemsWithEmptySourceText in sources/entity/tmgmt_entity.source.test
TMGMTEntitySourceUIController::overviewFormSubmit in sources/entity/ui/tmgmt_entity_ui.ui.inc
TMGMTI18nStringDefaultSourceUIController::overviewFormSubmit in sources/i18n_string/tmgmt_i18n_string.ui.inc
TMGMTLocaleSourceUIController::overviewFormSubmit in sources/locale/tmgmt_locale.ui.inc
Implements TMGMTSourceUIControllerInterface::overviewFormSubmit().

... See full list

File

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

Code

function tmgmt_job_create($source_language, $target_language, $uid = NULL, array $values = array()) {
  return entity_create('tmgmt_job', array_merge($values, array(
    'source_language' => $source_language,
    'target_language' => $target_language,
    'uid' => $uid,
  )));
}