You are here

public function ExampleDevelGenerate::validateDrushParams in Devel 4.x

Same name and namespace in other branches
  1. 8.3 devel_generate/tests/modules/devel_generate_example/src/Plugin/DevelGenerate/ExampleDevelGenerate.php \Drupal\devel_generate_example\Plugin\DevelGenerate\ExampleDevelGenerate::validateDrushParams()
  2. 8 devel_generate/tests/modules/devel_generate_example/src/Plugin/DevelGenerate/ExampleDevelGenerate.php \Drupal\devel_generate_example\Plugin\DevelGenerate\ExampleDevelGenerate::validateDrushParams()
  3. 8.2 devel_generate/tests/modules/devel_generate_example/src/Plugin/DevelGenerate/ExampleDevelGenerate.php \Drupal\devel_generate_example\Plugin\DevelGenerate\ExampleDevelGenerate::validateDrushParams()

Responsible for validating Drush params.

Parameters

array $args: The command arguments.

array $options: The commend options.

Return value

array An array of values ready to be used for generateElements().

Overrides DevelGenerateBaseInterface::validateDrushParams

File

devel_generate/tests/modules/devel_generate_example/src/Plugin/DevelGenerate/ExampleDevelGenerate.php, line 89

Class

ExampleDevelGenerate
Provides a ExampleDevelGenerate plugin.

Namespace

Drupal\devel_generate_example\Plugin\DevelGenerate

Code

public function validateDrushParams(array $args, array $options = []) {
  $values = [
    'num' => $options['num'],
    'kill' => $options['kill'],
  ];
  return $values;
}