Loads remote mappings based on local data.
int $tjid: Translation job id.
int $tjiid: Translation job item id.
int $data_item_key: Data item key.
static[] Array of TMGMTRemote entities.
Overrides RemoteMappingInterface::loadByLocalData
public static function loadByLocalData($tjid = NULL, $tjiid = NULL, $data_item_key = NULL) {
$data_item_key = \Drupal::service('tmgmt.data')
->ensureStringKey($data_item_key);
$query = \Drupal::entityQuery('tmgmt_remote');
$query
->accessCheck(TRUE);
if (!empty($tjid)) {
$query
->condition('tjid', $tjid);
}
if (!empty($tjiid)) {
$query
->condition('tjiid', $tjiid);
}
if (!empty($data_item_key)) {
$query
->condition('data_item_key', $data_item_key);
}
$trids = $query
->execute();
if (!empty($trids)) {
return static::loadMultiple($trids);
}
return array();
}