public static function RemoteMapping::loadByRemoteIdentifier in Translation Management Tool 8
Loads remote mapping entities based on remote identifier.
Parameters
string $remote_identifier_1: Remote identifier 1.
string $remote_identifier_2: Remote identifier 2.
string $remote_identifier_3: Remote identifier 3.
Return value
static[] Array of TMGMTRemote entities.
Overrides RemoteMappingInterface::loadByRemoteIdentifier
1 call to RemoteMapping::loadByRemoteIdentifier()
- CrudTest::testRemoteMappings in tests/
src/ Kernel/ CrudTest.php
File
- src/
Entity/ RemoteMapping.php, line 183
Class
- RemoteMapping
- Entity class for the tmgmt_remote entity.
Namespace
Drupal\tmgmt\EntityCode
public static function loadByRemoteIdentifier($remote_identifier_1 = NULL, $remote_identifier_2 = NULL, $remote_identifier_3 = NULL) {
$query = \Drupal::entityQuery('tmgmt_remote');
if ($remote_identifier_1 !== NULL) {
$query
->condition('remote_identifier_1', $remote_identifier_1);
}
if ($remote_identifier_2 !== NULL) {
$query
->condition('remote_identifier_2', $remote_identifier_2);
}
if ($remote_identifier_3 !== NULL) {
$query
->condition('remote_identifier_3', $remote_identifier_3);
}
$trids = $query
->execute();
if (!empty($trids)) {
return static::loadMultiple($trids);
}
return array();
}