You are here

public function GoogleAnalyticsJavaScriptSnippet::__construct in Google Analytics 8.2

Same name and namespace in other branches
  1. 8.3 src/Component/Render/GoogleAnalyticsJavaScriptSnippet.php \Drupal\google_analytics\Component\Render\GoogleAnalyticsJavaScriptSnippet::__construct()
  2. 4.x src/Component/Render/GoogleAnalyticsJavaScriptSnippet.php \Drupal\google_analytics\Component\Render\GoogleAnalyticsJavaScriptSnippet::__construct()

Constructs an HtmlEscapedText object.

Parameters

string $string: The string to escape. This value will be cast to a string.

File

src/Component/Render/GoogleAnalyticsJavaScriptSnippet.php, line 25

Class

GoogleAnalyticsJavaScriptSnippet
Formats a string for JavaScript display.

Namespace

Drupal\google_analytics\Component\Render

Code

public function __construct($string) {
  $this->string = (string) $string;
}