public function KeyAccessCheck::getKey

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.

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());
}