public function LingotekFilterManager::getDefaultFilter in Lingotek Translation 8.2
Same name and namespace in other branches
- 4.0.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.0.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.1.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.2.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.3.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.4.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.5.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.6.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.7.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
- 3.8.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::getDefaultFilter()
Get the default filter ID.
Return value
string ID of the default filter.
Overrides LingotekFilterManagerInterface::getDefaultFilter
2 calls to LingotekFilterManager::getDefaultFilter()
- LingotekFilterManager::getDefaultFilterLabel in src/
LingotekFilterManager.php - Get the default filter label.
- LingotekFilterManager::getFilterId in src/
LingotekFilterManager.php - Gets the filter that should be applied.
File
- src/
LingotekFilterManager.php, line 44
Class
- LingotekFilterManager
- Service for managing Lingotek Filters.
Namespace
Drupal\lingotekCode
public function getDefaultFilter() {
$filter = $this->configFactory
->get('lingotek.settings')
->get('default.filter');
$filters = $this
->getLocallyAvailableFilters();
if (!isset($filters[$filter])) {
$filter = NULL;
}
return $filter;
}