protected function LingotekFilterManager::chooseAppropriateFilterID in Lingotek Translation 3.7.x
Same name and namespace in other branches
- 8.2 src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 4.0.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 3.0.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 3.1.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 3.2.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 3.3.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 3.4.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 3.5.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 3.6.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
- 3.8.x src/LingotekFilterManager.php \Drupal\lingotek\LingotekFilterManager::chooseAppropriateFilterID()
Helper used to choose the appropriate filter ID based on the one listed in settings.
Parameters
string $settingsFilter: Either 'project_default', 'drupal_default' or the filter ID.
string $drupalDefaultFilterID: The Drupal default filter ID.
Return value
string|null The appropriate filter ID or NULL if project default is to be used.
2 calls to LingotekFilterManager::chooseAppropriateFilterID()
- LingotekFilterManager::getFilterId in src/
LingotekFilterManager.php - Gets the filter that should be applied.
- LingotekFilterManager::getSubfilterId in src/
LingotekFilterManager.php - Gets the subfilter that should be applied.
File
- src/
LingotekFilterManager.php, line 168
Class
- LingotekFilterManager
- Service for managing Lingotek Filters.
Namespace
Drupal\lingotekCode
protected function chooseAppropriateFilterID($settingsFilter, $drupalDefaultFilterID) {
$filter = $settingsFilter;
switch ($settingsFilter) {
case 'project_default':
$filter = NULL;
break;
case 'drupal_default':
$filter = $drupalDefaultFilterID;
break;
}
return $filter;
}