You are here

function config_delete_form_alter in Config Delete 8

Implements hook_form_alter().

File

./config_delete.module, line 26
This is the primary module file.

Code

function config_delete_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  if ($form_id == 'config_delete_form') {
    unset($form['export']);
    $form['config_delete_notice'] = [
      '#type' => 'markup',
      '#markup' => t('Notice: Deleting configuration items can potentially break your site! Please use this form only if you know what are you doing.'),
      '#prefix' => '<strong>',
      '#suffix' => '</strong>',
      '#weight' => -100,
    ];
    $form['delete_dependencies'] = [
      '#type' => 'checkbox',
      '#title' => t('Delete config dependencies'),
    ];
    $form['submit'] = [
      '#type' => 'submit',
      '#value' => t('Delete'),
    ];
  }
}