You are here

public function KeyAccessCheck::getKey in Translation Management Tool 8

Generates a key from job item data that can be used in the URL.

Parameters

\Drupal\tmgmt\JobItemInterface $tmgmt_job_item: Job item.

Return value

string Returns hashed key that is safe to use in the URL.

1 call to KeyAccessCheck::getKey()
KeyAccessCheck::access in sources/content/src/Access/KeyAccessCheck.php
Checks access for TMGMT job item.

File

sources/content/src/Access/KeyAccessCheck.php, line 51

Class

KeyAccessCheck
Checks access for TMGMT job item.

Namespace

Drupal\tmgmt_content\Access

Code

public function getKey(JobItemInterface $tmgmt_job_item) {
  return Crypt::hmacBase64($tmgmt_job_item
    ->id(), Settings::getHashSalt());
}