I'm less familiar with D8, but I need to re-write a views field output using some PHP. I've made a custom field template HTML.twig file, but I'm not sure what I need to do to be able to run a PHP execution on my field to render it out as I want.
I am trying to run a function on the User ID as I have a module which hashes it before sending it to an external platform, however, now the client wants the understand which user is which, and the only way I can think to do this is by performing the same hashing code on the User ID in a format I can easily cross reference the user with their hashed output
I have a very basic view table showing only the User ID and email address, and I've managed to create a views field override using this page which has overwritten my field successfully. But now I want to run a command I'm going to copy from my contrib module, the below to be specific, so that I can work out which User ID relates to which hashed code
return Crypt::hmacBase64($uid, \Drupal::service('private_key')->get() . Settings::getHashSalt());