You are here

public function ExampleDevelGenerate::validateDrushParams in Devel 8

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.2 devel_generate/tests/modules/devel_generate_example/src/Plugin/DevelGenerate/ExampleDevelGenerate.php \Drupal\devel_generate_example\Plugin\DevelGenerate\ExampleDevelGenerate::validateDrushParams()
  3. 4.x 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.

@Return 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 80

Class

ExampleDevelGenerate
Provides a ExampleDevelGenerate plugin.

Namespace

Drupal\devel_generate_example\Plugin\DevelGenerate

Code

public function validateDrushParams($args) {
  $values = array(
    'num' => array_shift($args),
    'kill' => drush_get_option('kill'),
  );
  return $values;
}