You are here

public function ActiveSiteAlertsCacheContext::__construct in Site Alert 8

Constructs an ActiveSiteAlertsCacheContext.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.

\Drupal\site_alert\GetAlertsInterface $getAlerts: The service that handles retrieval of site alerts.

\Drupal\Core\PrivateKey $privateKey: The private key service.

File

src/Cache/Context/ActiveSiteAlertsCacheContext.php, line 62

Class

ActiveSiteAlertsCacheContext
A cache context that varies by the currently active site alerts.

Namespace

Drupal\site_alert\Cache\Context

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, GetAlertsInterface $getAlerts, PrivateKey $privateKey) {
  $this->entityTypeManager = $entityTypeManager;
  $this->getAlerts = $getAlerts;
  $this->privateKey = $privateKey;
}