function ExampleDevelGenerate::settingsForm
Same name in other branches
- 4.x devel_generate/tests/modules/devel_generate_example/src/Plugin/DevelGenerate/ExampleDevelGenerate.php \Drupal\devel_generate_example\Plugin\DevelGenerate\ExampleDevelGenerate::settingsForm()
Overrides DevelGenerateBase::settingsForm
File
-
devel_generate/
tests/ modules/ devel_generate_example/ src/ Plugin/ DevelGenerate/ ExampleDevelGenerate.php, line 46
Class
- ExampleDevelGenerate
- Provides a ExampleDevelGenerate plugin.
Namespace
Drupal\devel_generate_example\Plugin\DevelGenerateCode
public function settingsForm(array $form, FormStateInterface $form_state) : array {
$form['num'] = [
'#type' => 'textfield',
'#title' => $this->t('How many examples would you like to generate?'),
'#default_value' => $this->getSetting('num'),
'#size' => 10,
];
$form['kill'] = [
'#type' => 'checkbox',
'#title' => $this->t('Delete all examples before generating new examples.'),
'#default_value' => $this->getSetting('kill'),
];
return $form;
}