function DevelGenerateForm::buildForm
Same name in other branches
- 5.x devel_generate/src/Form/DevelGenerateForm.php \Drupal\devel_generate\Form\DevelGenerateForm::buildForm()
Overrides FormInterface::buildForm
File
-
devel_generate/
src/ Form/ DevelGenerateForm.php, line 75
Class
- DevelGenerateForm
- Defines a form that allows privileged users to generate entities.
Namespace
Drupal\devel_generate\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$plugin_id = $this->getPluginIdFromRequest();
$instance = $this->getPluginInstance($plugin_id);
$form = $instance->settingsForm($form, $form_state);
$form['actions'] = [
'#type' => 'actions',
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Generate'),
'#button_type' => 'primary',
];
return $form;
}