public function UserEmailVerificationNeeded::getContext in User email verification 8
Returns the string representation of the cache context.
A cache context service's name is used as a token (placeholder) cache key, and is then replaced with the string returned by this method.
Return value
string The string representation of the cache context.
Overrides CacheContextInterface::getContext
File
- src/
Cache/ Context/ UserEmailVerificationNeeded.php, line 54
Class
- UserEmailVerificationNeeded
- Defines the UserEmailVerificationNeeded context service.
Namespace
Drupal\user_email_verification\Cache\ContextCode
public function getContext() {
return $this->currentUser
->isAuthenticated() && $this->userEmailVerification
->isVerificationNeeded() ? 'uev-needed' : '';
}