You are here

public function PiwikJavaScriptSnippet::__construct in Piwik Web Analytics 8

Constructs an HtmlEscapedText object.

Parameters

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

File

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

Class

PiwikJavaScriptSnippet
Formats a string for JavaScript display.

Namespace

Drupal\piwik\Component\Render

Code

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