You are here

private function PathContext::setContextIdentity in Acquia Lift Connector 8.4

Same name and namespace in other branches
  1. 8.3 src/Service/Context/PathContext.php \Drupal\acquia_lift\Service\Context\PathContext::setContextIdentity()

Set Context Identity.

Parameters

string $identity: Identity.

string $identityType: Identity type.

2 calls to PathContext::setContextIdentity()
PathContext::setContextIdentityByRequest in src/Service/Context/PathContext.php
Set Path Context Identity by request stack's query parameters.
PathContext::setContextIdentityByUser in src/Service/Context/PathContext.php
Set Context Identity by User.

File

src/Service/Context/PathContext.php, line 182

Class

PathContext

Namespace

Drupal\acquia_lift\Service\Context

Code

private function setContextIdentity($identity, $identityType) {

  // Sanitize string and output.
  $sanitized_identity = Html::escape($identity);
  $sanitized_identity_type = Html::escape($identityType);
  $this->htmlHeadContexts['identity:' . $sanitized_identity_type] = $sanitized_identity;
}