You are here

public function LingotekIntelligenceService::getDefaultAuthorEmail in Lingotek Translation 3.5.x

Same name and namespace in other branches
  1. 8.2 src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  2. 4.0.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  3. 3.0.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  4. 3.1.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  5. 3.2.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  6. 3.3.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  7. 3.4.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  8. 3.6.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  9. 3.7.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()
  10. 3.8.x src/LingotekIntelligenceService.php \Drupal\lingotek\LingotekIntelligenceService::getDefaultAuthorEmail()

Gets the Default Author Email.

Return value

bool

Overrides LingotekIntelligenceMetadataInterface::getDefaultAuthorEmail

File

src/LingotekIntelligenceService.php, line 229

Class

LingotekIntelligenceService
Service for managing Lingotek Intelligence related configuration.

Namespace

Drupal\lingotek

Code

public function getDefaultAuthorEmail() {

  /** @var \Drupal\lingotek\LingotekIntelligenceMetadataInterface $metadata */
  $metadata = $this->profile;
  $value = NULL;
  if ($this->profile !== NULL && $this->profile
    ->hasIntelligenceMetadataOverrides()) {
    if ($metadata
      ->getAuthorEmailPermission()) {
      $value = $metadata
        ->getDefaultAuthorEmail();
    }
  }
  else {
    if ($this->intelligenceConfig
      ->getAuthorEmailPermission()) {
      $value = $this->intelligenceConfig
        ->getDefaultAuthorEmail();
    }
  }
  return $value;
}