public function DepthDeleteDataForm::buildForm in Taxonomy Term Depth 8.2
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- src/
Form/ DepthDeleteDataForm.php, line 22
Class
Namespace
Drupal\taxonomy_term_depth\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
// drupal_set_message($this->t('This operation is irreversible and should be done before module uninstall!'), 'warning');
$form['remove_depth_field_data'] = [
'#type' => 'Fieldset',
'#title' => $this
->t('Prepare Removing Depth Field Data.'),
'#description' => $this
->t('Clicking on this button will remove the depth field data.'),
];
$form['remove_depth_field_data']['actions']['#type'] = 'actions';
$form['remove_depth_field_data']['actions']['delete'] = [
'#type' => 'submit',
'#value' => $this
->t('Delete data'),
'#button_type' => 'primary',
'#return_value' => 'submit',
];
return $form;
}