public function LingotekApi::getFilters in Lingotek Translation 3.1.x
Same name and namespace in other branches
- 8.2 src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 4.0.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 3.0.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 3.2.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 3.3.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 3.4.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 3.5.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 3.6.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 3.7.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
- 3.8.x src/Remote/LingotekApi.php \Drupal\lingotek\Remote\LingotekApi::getFilters()
Get the available filters on Lingotek.
Return value
array|bool Array of filters as in (id, label). FALSE if there is an error.
Overrides LingotekApiInterface::getFilters
File
- src/
Remote/ LingotekApi.php, line 426
Class
- LingotekApi
- A simple connector to the Lingotek Translation API.
Namespace
Drupal\lingotek\RemoteCode
public function getFilters() {
try {
$this->logger
->debug('Lingotek::getFilters called.');
$response = $this->lingotekClient
->get('/api/filter', [
'limit' => 1000,
]);
} catch (\Exception $e) {
throw new LingotekApiException('Failed to get filters: ' . $e
->getMessage());
}
return $this
->formatResponse($response);
}