You are here

public function GdprSqlDump::__construct in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/gdpr_dump/src/Service/GdprSqlDump.php \Drupal\gdpr_dump\Service\GdprSqlDump::__construct()
  2. 3.0.x modules/gdpr_dump/src/Service/GdprSqlDump.php \Drupal\gdpr_dump\Service\GdprSqlDump::__construct()

GdprSqlDump constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: Config factory.

\Drupal\Core\Database\Connection $database: The database.

\Drupal\gdpr_dump\Service\GdprDatabaseManager $gdprDatabaseManager: The GDPR database manager.

\Drupal\anonymizer\Anonymizer\AnonymizerFactory $pluginFactory: The anonymizer plugin factory.

File

modules/gdpr_dump/src/Service/GdprSqlDump.php, line 97

Class

GdprSqlDump
Class GdprSqlDump.

Namespace

Drupal\gdpr_dump\Service

Code

public function __construct(ConfigFactoryInterface $configFactory, Connection $database, GdprDatabaseManager $gdprDatabaseManager, AnonymizerFactory $pluginFactory) {
  $this->tablesToAnonymize = $configFactory
    ->get(SettingsForm::GDPR_DUMP_CONF_KEY)
    ->get('mapping');
  $this->tablesToSkip = $configFactory
    ->get(SettingsForm::GDPR_DUMP_CONF_KEY)
    ->get('empty_tables');
  $this->database = $database;
  $this->driver = $this->database
    ->driver();
  $this->databaseManager = $gdprDatabaseManager;
  $this->pluginFactory = $pluginFactory;
}