class GdprSanitize in General Data Protection Regulation 8
Same name and namespace in other branches
- 8.2 modules/gdpr_dump/src/Service/GdprSanitize.php \Drupal\gdpr_dump\Service\GdprSanitize
- 3.0.x modules/gdpr_dump/src/Service/GdprSanitize.php \Drupal\gdpr_dump\Service\GdprSanitize
Class GdprSqlDump.
@package Drupal\gdpr_dump\Service
Hierarchy
- class \Drupal\gdpr_dump\Service\GdprSqlDump
- class \Drupal\gdpr_dump\Service\GdprSanitize
Expanded class hierarchy of GdprSanitize
1 string reference to 'GdprSanitize'
- gdpr_dump.services.yml in modules/
gdpr_dump/ gdpr_dump.services.yml - modules/gdpr_dump/gdpr_dump.services.yml
1 service uses GdprSanitize
- gdpr_dump.sanitize in modules/
gdpr_dump/ gdpr_dump.services.yml - \Drupal\gdpr_dump\Service\GdprSanitize
File
- modules/
gdpr_dump/ src/ Service/ GdprSanitize.php, line 10
Namespace
Drupal\gdpr_dump\ServiceView source
class GdprSanitize extends GdprSqlDump {
/**
* Go through the data and sanitize it.
*
* @throws \Exception
*/
public function sanitize() {
$this
->prepare();
$this
->rename();
}
/**
* Rename the cloned tables to the original tables.
*/
protected function rename() {
$transaction = $this->database
->startTransaction('gdpr_rename_table');
foreach (\array_keys($this->tablesToAnonymize) as $table) {
$gdprTable = self::GDPR_TABLE_PREFIX . $table;
$this->database
->schema()
->dropTable($table);
$this->database
->schema()
->renameTable($gdprTable, $table);
}
$this->database
->popTransaction($transaction
->name());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GdprSanitize:: |
protected | function | Rename the cloned tables to the original tables. | |
GdprSanitize:: |
public | function | Go through the data and sanitize it. | |
GdprSqlDump:: |
protected | property | The database. | |
GdprSqlDump:: |
protected | property | GDPR database manager. | |
GdprSqlDump:: |
protected | property | The database driver. | |
GdprSqlDump:: |
protected | property | The Sanitizer plugin factory. | |
GdprSqlDump:: |
protected | property | The GDPR table settings. | |
GdprSqlDump:: |
protected | property | The list of tables needed to be skipped. | |
GdprSqlDump:: |
protected | function | Builds tablesToSkip array. | |
GdprSqlDump:: |
protected | function | Cleanup the database after the dump. | |
GdprSqlDump:: |
protected | function | Creates a query string for cloning. | |
GdprSqlDump:: |
protected | function | Creates table clones according to the config. | |
GdprSqlDump:: |
public | function | Dump command. | |
GdprSqlDump:: |
constant | |||
GdprSqlDump:: |
protected | function | Get a SqlBase instance according to dbSpecs. | |
GdprSqlDump:: |
protected | function | Prepare the database for the dump. | |
GdprSqlDump:: |
protected | function | Go through the data and sanitize it. | |
GdprSqlDump:: |
public | function | GdprSqlDump constructor. |