You are here

public function TMGMTTestTranslatorPluginController::rejectDataItem in Translation Management Tool 7

Reject one single data item.

@todo Using job item breaks the current convention which uses jobs.

Parameters

$job_item: The job item to which the rejected data item belongs.

$key: The key of the rejected data item. The key is an array containing the keys of a nested array hierarchy path.

Return value

TRUE if the reject was succesfull, else FALSE. In case of an error, it is the responsibility of the translator to provide informations about the faliure.

Overrides TMGMTTranslatorRejectDataItem::rejectDataItem

File

tests/tmgmt_test.plugin.translator.inc, line 96
Cotains the test translator plugin.

Class

TMGMTTestTranslatorPluginController
@file Cotains the test translator plugin.

Code

public function rejectDataItem(TMGMTJobItem $job_item, array $key, array $values = NULL) {
  $key = '[' . implode('][', $key) . ']';
  $job_item
    ->addMessage('Rejected data item @key for job item @item in job @job.', array(
    '@key' => $key,
    '@item' => $job_item->tjiid,
    '@job' => $job_item->tjid,
  ));
  return TRUE;
}