예제 #1
0
 /**
  * Form submission handler.
  *
  * @param array $form
  *   An associative array containing the structure of the form.
  * @param \Drupal\Core\Form\FormStateInterface $form_state
  *   The current state of the form.
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $config = $form_state->getValues();
     backup_migrate_perform_restore($config['source_id'], $this->destination->id(), $this->backup_id, $config);
     $form_state->setRedirectUrl($this->getCancelUrl());
 }
예제 #2
0
 /**
  * List the backups in the given destination.
  *
  * @param \Drupal\backup_migrate\Entity\Destination $backup_migrate_destination
  * @return mixed
  */
 public function listDestinationEntityBackups(Destination $backup_migrate_destination)
 {
     $destination = $backup_migrate_destination->getObject();
     return $this->listDestinationBackups($destination, $backup_migrate_destination->id());
 }