public function LingotekFake::addTarget in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 4.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.1.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.2.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.3.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.4.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.5.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.6.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.7.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
- 3.8.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::addTarget()
Requests a translation to the Lingotek service.
Parameters
string $doc_id: The document id to translate.
string $locale: The Lingotek locale to request.
\Drupal\lingotek\LingotekProfileInterface $profile: The profile being used.
Return value
mixed
Overrides LingotekInterface::addTarget
File
- tests/
modules/ lingotek_test/ src/ LingotekFake.php, line 209
Class
Namespace
Drupal\lingotek_testCode
public function addTarget($doc_id, $locale, LingotekProfileInterface $profile = NULL) {
\Drupal::state()
->set('lingotek.added_target_locale', $locale);
\Drupal::state()
->set('lingotek.used_profile', $profile ? $profile
->id() : NULL);
// Added locale as target.
return TRUE;
}