You are here

public function JobInterface::addTranslatedData in Translation Management Tool 8

Store translated data back into the items.

Parameters

array $data: Partially or complete translated data, the most upper key needs to be the translation job item id.

array|string $key: (Optional) Either a flattened key (a 'key1][key2][key3' string) or a nested one, e.g. array('key1', 'key2', 'key2'). Defaults to an empty array which means that it will replace the whole translated data array. The most upper key entry needs to be the job id (tjiid).

int|null $status: (Optional) The data item status that will be set. Defaults to NULL, which means that it will be set to translated unless it was previously set to preliminary, then it will keep that state. Explicitly pass TMGMT_DATA_ITEM_STATE_TRANSLATED or TMGMT_DATA_ITEM_STATE_PRELIMINARY to set it to that value. Other statuses are not supported.

Throws

\Drupal\tmgmt\TMGMTException If is given an unsupported status.

1 method overrides JobInterface::addTranslatedData()
Job::addTranslatedData in src/Entity/Job.php
Store translated data back into the items.

File

src/JobInterface.php, line 669

Class

JobInterface
Interface for tmgmt_job entity.

Namespace

Drupal\tmgmt

Code

public function addTranslatedData(array $data, $key = NULL, $status = NULL);