protected function LingotekNotificationController::getProfile in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 4.0.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.0.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.1.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.2.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.3.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.4.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.5.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.6.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.7.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
- 3.8.x src/Controller/LingotekNotificationController.php \Drupal\lingotek\Controller\LingotekNotificationController::getProfile()
1 call to LingotekNotificationController::getProfile()
- LingotekNotificationController::endpoint in src/
Controller/ LingotekNotificationController.php
File
- src/
Controller/ LingotekNotificationController.php, line 106
Class
- LingotekNotificationController
- Returns responses for lingotek module setup routes.
Namespace
Drupal\lingotek\ControllerCode
protected function getProfile($entity) {
/** @var \Drupal\lingotek\LingotekConfigurationServiceInterface $configuration_service */
$configuration_service = \Drupal::service('lingotek.configuration');
$profile = NULL;
if ($entity instanceof ContentEntityInterface) {
$profile = $configuration_service
->getEntityProfile($entity, FALSE);
}
elseif ($entity instanceof ConfigEntityInterface) {
$profile = $configuration_service
->getConfigEntityProfile($entity, FALSE);
}
return $profile;
}