You are here

protected function RequestTranslationApproveForm::getConflictingItem in TMGMT Extension Suite 8

Returns job item ids that conflicts with a given node.

Parameters

array $data:

$target_language:

Return value

array

1 call to RequestTranslationApproveForm::getConflictingItem()
RequestTranslationApproveForm::submitForm in src/Form/RequestTranslationApproveForm.php
Form submission handler.

File

src/Form/RequestTranslationApproveForm.php, line 80

Class

RequestTranslationApproveForm

Namespace

Drupal\tmgmt_extension_suit\Form

Code

protected function getConflictingItem(array $data, $target_language) {
  return Drupal::entityQuery('tmgmt_job_item')
    ->condition('state', [
    JobItemInterface::STATE_ACTIVE,
    JobItemInterface::STATE_REVIEW,
  ], 'IN')
    ->condition('plugin', $data['plugin'])
    ->condition('item_type', $data['item_type'])
    ->condition('item_id', $data['item'])
    ->condition('tjid.entity.source_language', $data['source_language'])
    ->condition('tjid.entity.target_language', $target_language)
    ->execute();
}