function VocabularyDevelGenerate::validateDrushParams
Same name in other branches
- 8.x-1.x devel_generate/src/Plugin/DevelGenerate/VocabularyDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\VocabularyDevelGenerate::validateDrushParams()
- 4.x devel_generate/src/Plugin/DevelGenerate/VocabularyDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\VocabularyDevelGenerate::validateDrushParams()
Overrides DevelGenerateBaseInterface::validateDrushParams
File
-
devel_generate/
src/ Plugin/ DevelGenerate/ VocabularyDevelGenerate.php, line 144
Class
- VocabularyDevelGenerate
- Provides a VocabularyDevelGenerate plugin.
Namespace
Drupal\devel_generate\Plugin\DevelGenerateCode
public function validateDrushParams(array $args, array $options = []) : array {
$values = [
'num' => array_shift($args),
'kill' => $options['kill'],
'title_length' => 12,
];
if ($this->isNumber($values['num']) == FALSE) {
throw new \Exception(dt('Invalid number of vocabularies: @num.', [
'@num' => $values['num'],
]));
}
return $values;
}