Overrides CalculatedCacheContextInterface::getContext
public function getContext($role = NULL) { if ($role === NULL) { return implode(',', $this->user ->getRoles()); } else { return in_array($role, $this->user ->getRoles()) ? 'true' : 'false'; } }