You are here

function drush_gdpr_sanitize in General Data Protection Regulation 8

Command callback for gdpr-sanitize.

Sanitizes the current environment.

1 string reference to 'drush_gdpr_sanitize'
gdpr_dump_drush_command in modules/gdpr_dump/gdpr_dump.drush.inc
Implements hook_drush_command().

File

modules/gdpr_dump/gdpr_dump.drush.inc, line 88
This file contains the GDPR database dump command.

Code

function drush_gdpr_sanitize() {

  /** @var \Drupal\gdpr_dump\Service\GdprSanitize $service */
  $service = \Drupal::service('gdpr_dump.sanitize');
  try {
    $service
      ->sanitize();
  } catch (\Exception $e) {
    return drush_set_error('DRUSH_DUMP_ERROR', $e
      ->getMessage());
  }
}