public function GoogleAnalyticsJavaScriptSnippet::__construct in Google Analytics 4.x
Same name and namespace in other branches
- 8.3 src/Component/Render/GoogleAnalyticsJavaScriptSnippet.php \Drupal\google_analytics\Component\Render\GoogleAnalyticsJavaScriptSnippet::__construct()
- 8.2 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\RenderCode
public function __construct($string) {
$this->string = (string) $string;
}