You are here

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

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

Get the default filter label.

Return value

string ID of the default filter.

Overrides LingotekFilterManagerInterface::getDefaultSubfilterLabel

File

src/LingotekFilterManager.php, line 81

Class

LingotekFilterManager
Service for managing Lingotek Filters.

Namespace

Drupal\lingotek

Code

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