public function LingotekApi::changeWorkflow in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.4 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::changeWorkflow()
- 7.5 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::changeWorkflow()
- 7.6 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::changeWorkflow()
Updates one or more nids to belong to a given workflow
Parameters
array $document_ids: An array of document IDs
string $workflow_id: A string containing the desired workflow_id
string $prefillPhase: An optional parameter specifying the prefill phase
Return value
bool TRUE on success, FALSE on failure.
File
- lib/
Drupal/ lingotek/ LingotekApi.php, line 990 - Defines Drupal\lingotek\LingotekApi
Class
- LingotekApi
- @file Defines Drupal\lingotek\LingotekApi
Code
public function changeWorkflow($document_ids, $workflow_id, $prefillPhase = NULL) {
$parameters = array(
'documentId' => $document_ids,
'workflowId' => $workflow_id,
'preserveTargets' => 'true',
);
if ($prefillPhase) {
$parameters['prefillPhase'] = $prefillPhase;
}
return $this
->request('resetDocument', $parameters) ? TRUE : FALSE;
}