AnalyticsJsMarkup
Defines an object that passes safe strings through the render system.
This object should only be constructed with a known safe string. If there is any risk that the string contains user-entered data that has not been filtered first, it must not be used.
- Full name:
\Drupal\analytics\Render\AnalyticsJsMarkup - This class is marked as final and can't be subclassed
- This class implements:
MarkupInterface,Countable - This class is a Final class
Methods
create
{@inheritdoc}
public static create(mixed $string): mixed
- This method is static. Parameters:
| Parameter | Type | Description |
|---|---|---|
$string |
mixed |
isDntEnforced
Checks if the Do Not Track protection is enabled.
public static isDntEnforced(): bool
- This method is static. Return Value:
TRUE if scripts should only run when Do Not Track is off.