You are here

public function LingotekFake::getFilters in Lingotek Translation 3.7.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.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  4. 3.1.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  5. 3.2.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  6. 3.3.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  7. 3.4.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  8. 3.5.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getFilters()
  9. 3.6.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 96

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',
  ];
  $filters = [];
  if (!\Drupal::state()
    ->get('lingotek.no_filters', FALSE)) {
    $filters = $default_filters;
  }
  return $filters;
}