You are here

public function LingotekFilterManager::getDefaultSubfilter in Lingotek Translation 3.7.x

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

Get the default subfilter ID.

Return value

string ID of the default subfilter.

Overrides LingotekFilterManagerInterface::getDefaultSubfilter

2 calls to LingotekFilterManager::getDefaultSubfilter()
LingotekFilterManager::getDefaultSubfilterLabel in src/LingotekFilterManager.php
Get the default filter label.
LingotekFilterManager::getSubfilterId in src/LingotekFilterManager.php
Gets the subfilter that should be applied.

File

src/LingotekFilterManager.php, line 56

Class

LingotekFilterManager
Service for managing Lingotek Filters.

Namespace

Drupal\lingotek

Code

public function getDefaultSubfilter() {
  $filter = $this->configFactory
    ->get('lingotek.settings')
    ->get('default.subfilter');
  $filters = $this
    ->getLocallyAvailableFilters();
  if (!isset($filters[$filter])) {
    $filter = NULL;
  }
  return $filter;
}