public function LingotekFake::getFilters in Lingotek Translation 8.2
Same name and namespace in other branches
- 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.6.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
File
- tests/
modules/ lingotek_test/ src/ LingotekFake.php, line 145
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',
];
if (\Drupal::state()
->get('lingotek.no_filters', FALSE)) {
return [];
}
return $default_filters;
}