protected function LingotekNotificationController::getEntity in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 4.0.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.0.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.1.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.2.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.3.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.4.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.5.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.6.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.7.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
- 3.8.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getEntity()
1 call to LingotekNotificationController::getEntity()
- LingotekNotificationController::endpoint in src/
Controller/ LingotekNotificationController.php
File
- src/
Controller/ LingotekNotificationController.php, line 119
Class
- LingotekNotificationController
- Returns responses for lingotek module setup routes.
Namespace
Drupal\lingotek\ControllerCode
protected function getEntity($document_id) {
/** @var \Drupal\lingotek\LingotekContentTranslationServiceInterface $translation_service */
$translation_service = \Drupal::service('lingotek.content_translation');
$entity = $translation_service
->loadByDocumentId($document_id);
if ($entity === NULL) {
/** @var \Drupal\lingotek\LingotekConfigTranslationServiceInterface $translation_service */
$translation_service = \Drupal::service('lingotek.config_translation');
$entity = $translation_service
->loadByDocumentId($document_id);
}
return $entity;
}