You are here

public function LingotekProfile::filterTargetLocales in Lingotek Translation 7.7

File

lib/Drupal/lingotek/LingotekProfile.php, line 577
Defines LingotekProfile

Class

LingotekProfile
A class wrapper for Lingotek Profiles

Code

public function filterTargetLocales($available_locales) {
  $filtered_locales = array();
  $default_workflow = $this
    ->getWorkflow();

  // foreach locale, get the overrides
  foreach ($available_locales as $locale) {
    if ($this
      ->isTargetLocaleDisabled($locale)) {

      // filter this out.
    }
    elseif ($this
      ->isTargetLocaleCustom($locale)) {
      $filtered_locales[$locale] = $this
        ->getTargetLocaleOverrides($locale);
    }
    else {
      $filtered_locales[$locale] = TRUE;
    }
  }
  return $filtered_locales;
}