optOutNotificationConfig = $optOutNotificationConfig; $this->escaper = $escaper; } /** * @return bool */ public function isEnabled(): bool { return $this->optOutNotificationConfig->isEnabled(); } /** * @param bool $escapeForJs * @return string */ public function getNotificationHtml(bool $escapeForJs = false): string { $html = << {$this->optOutNotificationConfig->getNotificationText()} HTML; return $escapeForJs ? $this->escaper->escapeJs($html) : $html; } }