25 private static $conditionName =
'can_view_notification';
32 private static $cachePrefix =
'release-notification-popup-';
37 private $viewerLogger;
47 private $productMetadata;
52 private $cacheStorage;
68 $this->viewerLogger = $viewerLogger;
70 $this->productMetadata = $productMetadata;
71 $this->cacheStorage = $cacheStorage;
81 $userId = $this->session->getUser()->getId();
82 $cacheKey = self::$cachePrefix . $userId;
83 $value = $this->cacheStorage->load($cacheKey);
86 $this->viewerLogger->get($userId)->getLastViewVersion(),
87 $this->productMetadata->getVersion(),
90 $this->cacheStorage->save(
false, $cacheKey);
102 return self::$conditionName;
isVisible(array $arguments)
__construct(Logger $viewerLogger, Session $session, ProductMetadataInterface $productMetadata, CacheInterface $cacheStorage)