You are here

protected static function EntityExportCsvBatch::getToken in Entity Export CSV 8

Get a token from the Csrf Generator.

Parameters

string $file_uri: The file uri.

Return value

string The token related to the file uri.

1 call to EntityExportCsvBatch::getToken()
EntityExportCsvBatch::finished in src/EntityExportCsvBatch.php
The finished callback for the entity content export.

File

src/EntityExportCsvBatch.php, line 271

Class

EntityExportCsvBatch
Define entity export csv batch.

Namespace

Drupal\entity_export_csv

Code

protected static function getToken($file_uri) {

  /** @var \Drupal\Core\Access\CsrfTokenGenerator $csrf_token */
  $csrf_token = \Drupal::service('csrf_token');
  return $csrf_token
    ->get($file_uri);
}