function VocabularyDevelGenerate::settingsForm
Same name in other branches
- 8.x-1.x devel_generate/src/Plugin/DevelGenerate/VocabularyDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\VocabularyDevelGenerate::settingsForm()
- 5.x devel_generate/src/Plugin/DevelGenerate/VocabularyDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\VocabularyDevelGenerate::settingsForm()
Overrides DevelGenerateBase::settingsForm
File
-
devel_generate/
src/ Plugin/ DevelGenerate/ VocabularyDevelGenerate.php, line 68
Class
- VocabularyDevelGenerate
- Provides a VocabularyDevelGenerate plugin.
Namespace
Drupal\devel_generate\Plugin\DevelGenerateCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form['num'] = [
'#type' => 'number',
'#title' => $this->t('Number of vocabularies?'),
'#default_value' => $this->getSetting('num'),
'#required' => TRUE,
'#min' => 0,
];
$form['title_length'] = [
'#type' => 'number',
'#title' => $this->t('Maximum number of characters in vocabulary names'),
'#default_value' => $this->getSetting('title_length'),
'#required' => TRUE,
'#min' => 2,
'#max' => 255,
];
$form['kill'] = [
'#type' => 'checkbox',
'#title' => $this->t('Delete existing vocabularies before generating new ones.'),
'#default_value' => $this->getSetting('kill'),
];
return $form;
}