You are here

private function SynonymDrushCommands::validateOptionType in Search API Synonym 8

Validate that the type option is valid.

Parameters

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

Return value

boolean TRUE if valid, FALSE if invalid.

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

File

src/Command/SynonymDrushCommands.php, line 107
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 validateOptionType($type) {
  $types = [
    'synonym',
    'spelling_error',
    'all',
  ];
  return in_array($type, $types);
}