public function LingotekProfile::getAttribute in Lingotek Translation 7.7
7 calls to LingotekProfile::getAttribute()
- LingotekProfile::getName in lib/
Drupal/ lingotek/ LingotekProfile.php - LingotekProfile::getProjectId in lib/
Drupal/ lingotek/ LingotekProfile.php - LingotekProfile::getWorkflow in lib/
Drupal/ lingotek/ LingotekProfile.php - LingotekProfile::isAutoDownload in lib/
Drupal/ lingotek/ LingotekProfile.php - LingotekProfile::isNodeBased in lib/
Drupal/ lingotek/ LingotekProfile.php
File
- lib/
Drupal/ lingotek/ LingotekProfile.php, line 457 - Defines LingotekProfile
Class
- LingotekProfile
- A class wrapper for Lingotek Profiles
Code
public function getAttribute($attrib_name, $target_locale = NULL) {
if (!empty($target_locale) && isset($this->profile['target_language_overrides'][$target_locale][$attrib_name])) {
return $this->profile['target_language_overrides'][$target_locale][$attrib_name];
}
elseif ($this
->lookForInherited()) {
if (!empty($this->profile[$attrib_name])) {
return $this->profile[$attrib_name];
}
elseif (!empty(self::$global_profile[$attrib_name])) {
return self::$global_profile[$attrib_name];
}
}
return NULL;
}