You are here

public function State::rollback in Acquia Connector 3.x

Delete the specified destination object from the target Drupal.

Parameters

array $destination_identifier: The ID of the destination object to delete.

Overrides DestinationBase::rollback

File

src/Plugin/migrate/destination/State.php, line 129

Class

State
The destination plugin for importing data into the state.

Namespace

Drupal\acquia_connector\Plugin\migrate\destination

Code

public function rollback(array $destination_identifier) {

  // Destination identifier is a comma-concatenated string of state names.
  // This identifier is the comma separated return value from ::import().
  foreach (explode(',', $destination_identifier['state_names']) as $key) {
    $this->state
      ->delete($key);
  }
}