You are here

protected function ExportUser::generateFilePath in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php \Drupal\social_user_export\Plugin\Action\ExportUser::generateFilePath()
  2. 8.6 modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php \Drupal\social_user_export\Plugin\Action\ExportUser::generateFilePath()
  3. 8.7 modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php \Drupal\social_user_export\Plugin\Action\ExportUser::generateFilePath()
  4. 8.8 modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php \Drupal\social_user_export\Plugin\Action\ExportUser::generateFilePath()
  5. 10.0.x modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php \Drupal\social_user_export\Plugin\Action\ExportUser::generateFilePath()
  6. 10.1.x modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php \Drupal\social_user_export\Plugin\Action\ExportUser::generateFilePath()
  7. 10.2.x modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php \Drupal\social_user_export\Plugin\Action\ExportUser::generateFilePath()

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

social_user_export_file_download()

1 call to ExportUser::generateFilePath()
ExportUser::executeMultiple in modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php
Execute action on multiple entities.
2 methods override ExportUser::generateFilePath()
ExportEnrolments::generateFilePath in modules/social_features/social_event/modules/social_event_enrolments_export/src/Plugin/Action/ExportEnrolments.php
To make sure the file can be downloaded, the path must be declared in the download pattern of the social user export module.
ExportMember::generateFilePath in modules/social_features/social_group/modules/social_group_members_export/src/Plugin/Action/ExportMember.php
To make sure the file can be downloaded, the path must be declared in the download pattern of the social user export module.

File

modules/social_features/social_user_export/src/Plugin/Action/ExportUser.php, line 238

Class

ExportUser
Exports a user accounts to CSV.

Namespace

Drupal\social_user_export\Plugin\Action

Code

protected function generateFilePath() : string {
  $hash = md5(microtime(TRUE));
  return 'export-users-' . substr($hash, 20, 12) . '.csv';
}