protected function ExportDataPolicy::generateFilePath in Data Policy 8
Returns a unique file path for this export.
The returned path is relative to getBaseOutputDirectory(). This allows it to work on distributed systems where the temporary file path may change in between batch ticks.
To make sure the file can be downloaded, the path must be declared in the download pattern of the social user export module.
Return value
string The path to the file.
See also
data_policy_export_file_download()
1 call to ExportDataPolicy::generateFilePath()
- ExportDataPolicy::executeMultiple in modules/
data_policy_export/ src/ Plugin/ Action/ ExportDataPolicy.php
File
- modules/
data_policy_export/ src/ Plugin/ Action/ ExportDataPolicy.php, line 249
Class
- ExportDataPolicy
- Exports data policies to CSV.
Namespace
Drupal\data_policy_export\Plugin\ActionCode
protected function generateFilePath() : string {
$hash = md5(microtime(TRUE));
return 'export-data-policies-' . substr($hash, 20, 12) . '.csv';
}