You are here

public function LingotekFilterManager::getDefaultFilterLabel in Lingotek Translation 3.2.x

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

Get the default filter label.

Return value

string ID of the default filter.

Overrides LingotekFilterManagerInterface::getDefaultFilterLabel

File

src/LingotekFilterManager.php, line 68

Class

LingotekFilterManager
Service for managing Lingotek Filters.

Namespace

Drupal\lingotek

Code

public function getDefaultFilterLabel() {
  $label = '';
  $filter = $this
    ->getDefaultFilter();
  $filters = $this
    ->getLocallyAvailableFilters();
  if (isset($filters[$filter])) {
    $label = $filters[$filter];
  }
  return $label;
}