You are here

public function ExportDataPolicy::__construct in Data Policy 8

Constructs a ExportDataPolicy object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\data_policy_export\Plugin\DataPolicyExportPluginManager $dataPolicyExportPlugin: The user export plugin manager.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user account.

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: Config factory for the export plugin access.

\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: Date formatter to be able to format the date to human-friendly.

File

modules/data_policy_export/src/Plugin/Action/ExportDataPolicy.php, line 84

Class

ExportDataPolicy
Exports data policies to CSV.

Namespace

Drupal\data_policy_export\Plugin\Action

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, DataPolicyExportPluginManager $dataPolicyExportPlugin, LoggerInterface $logger, AccountProxyInterface $currentUser, ConfigFactoryInterface $configFactory, DateFormatterInterface $date_formatter) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->dataPolicyExportPlugin = $dataPolicyExportPlugin;
  $this->logger = $logger;
  $this->currentUser = $currentUser;
  $this->dateFormatter = $date_formatter;
}