You are here

protected function LingotekIntelligenceService::getPermission in Lingotek Translation 4.0.x

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

Checks the permission given the overrides.

Parameters

string $permissionMethod: The permission method being called.

Return value

bool The access check result.

16 calls to LingotekIntelligenceService::getPermission()
LingotekIntelligenceService::getAuthorEmailPermission in src/LingotekIntelligenceService.php
Gets the Permission setting for whether or not the Author Email should be sent.
LingotekIntelligenceService::getAuthorPermission in src/LingotekIntelligenceService.php
Gets the Permission setting for Author Permission.
LingotekIntelligenceService::getBaseDomainPermission in src/LingotekIntelligenceService.php
Gets the Permission setting for whether or not to include the Base Domain in the metadata.
LingotekIntelligenceService::getBusinessDivisionPermission in src/LingotekIntelligenceService.php
Gets the Permission setting for whether or not to use the Business Division.
LingotekIntelligenceService::getBusinessUnitPermission in src/LingotekIntelligenceService.php
Gets the Permission setting for wheter or not to use the Business Unit.

... See full list

File

src/LingotekIntelligenceService.php, line 497

Class

LingotekIntelligenceService
Service for managing Lingotek Intelligence related configuration.

Namespace

Drupal\lingotek

Code

protected function getPermission($permissionMethod) {
  $value = NULL;
  if ($this->profile !== NULL && $this->profile
    ->hasIntelligenceMetadataOverrides()) {
    $value = $this->profile
      ->{$permissionMethod}();
  }
  else {
    $value = $this->intelligenceConfig
      ->{$permissionMethod}();
  }
  return $value;
}