You are here

function hook_tmgmt_ui_job_checkout_after_alter in Translation Management Tool 7

Allows to alter job checkout workflow after the default behavior.

Parameters

$redirects: List of redirects the user is supposed to be redirected to.

$jobs: Array with the translation jobs to be checked out.

1 invocation of hook_tmgmt_ui_job_checkout_after_alter()
tmgmt_ui_job_checkout_multiple in ui/tmgmt_ui.module
Attempts to check out a number of jobs. Performs a number of checks on each job and also allows to alter the behavior through hooks.

File

ui/tmgmt_ui.api.php, line 35
API documentation file for Translation Management API.

Code

function hook_tmgmt_ui_job_checkout_after_alter(&$redirects, &$jobs) {

  // Redirect to custom multi-checkout form if there are multple redirects.
  if (count($redirects) > 2) {
    $redirects = array(
      '/my/custom/checkout/form/' . implode(',', array_keys($jobs)),
    );
  }
}