You are here

function backup_migrate_form_alter in Backup and Migrate 8.4

Same name and namespace in other branches
  1. 5.0.x backup_migrate.module \backup_migrate_form_alter()

Implements hook_form_alter().

File

./backup_migrate.module, line 200
Primary hook implementations for Backup Migrate.

Code

function backup_migrate_form_alter(&$form, FormStateInterface $form_state, $form_id) {

  // Label the items being deleted on uninstall to make the 'entire site' listing less terrifying.
  if ($form_id === 'system_modules_uninstall_confirm_form') {
    if (isset($form['entity_deletes']['backup_migrate_source'])) {
      $form['text']['#markup'] .= '<p>' . t('Uninstalling Backup and Migrate will delete any custom Backup and Migrate configuration. <strong>Previously created backups will not be deleted.</strong>') . '</p>';
    }
    if (isset($form['entity_deletes']['backup_migrate_source']['#items']['entire_site'])) {
      $form['entity_deletes']['backup_migrate_source']['#items']['entire_site'] = t('Full Site Backup Source');
    }
  }
}