You are here

public function LingotekFake::getFilters in Lingotek Translation 3.0.x

Same name and namespace in other branches
  1. 8.2 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  2. 4.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  3. 3.1.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  4. 3.2.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  5. 3.3.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  6. 3.4.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  7. 3.5.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  8. 3.6.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  9. 3.7.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  10. 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 145

Class

LingotekFake

Namespace

Drupal\lingotek_test

Code

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;
}