public function LingotekFake::getFilters in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 4.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 3.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 3.1.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 3.2.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 3.3.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 3.4.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 3.5.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 3.7.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
- 3.8.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
Get all the available filters.
Parameters
bool $force: If we should force a refresh or we can use the local storage.
Return value
array Array of filters as in (id, label).
Overrides LingotekInterface::getFilters
1 call to LingotekFake::getFilters()
- LingotekFake::getResources in tests/
modules/ lingotek_test/ src/ LingotekFake.php - Gets the account related resources.
File
- tests/
modules/ lingotek_test/ src/ LingotekFake.php, line 94
Class
Namespace
Drupal\lingotek_testCode
public function getFilters($force = FALSE) {
$default_filters = [
'test_filter' => 'Test filter',
'test_filter2' => 'Test filter 2',
'test_filter3' => 'Test filter 3',
];
$filters = [];
if (!\Drupal::state()
->get('lingotek.no_filters', FALSE)) {
$filters = $default_filters;
}
return $filters;
}