You are here

private function SynonymDrushCommands::validateOptionFilter in Search API Synonym 8

Validate that the filter option is valid.

Parameters

string $filter: Type value from --filter command option.

Return value

boolean TRUE if valid, FALSE if invalid.

1 call to SynonymDrushCommands::validateOptionFilter()
SynonymDrushCommands::export in src/Command/SynonymDrushCommands.php
Export search synonyms to a specific format.

File

src/Command/SynonymDrushCommands.php, line 121
Drush commands for the Search API Synonym module.

Class

SynonymDrushCommands
Drush commands for the Search API Synonym module.

Namespace

Drupal\search_api_synonym\Command

Code

private function validateOptionFilter($filter) {
  $filters = [
    'nospace',
    'onlyspace',
    'all',
  ];
  return in_array($filter, $filters);
}