Documentation

AttributesHelper
in package

Helper functionality for HTML attributes in association with `Constants`.

Table of Contents

Methods

hasCssDocumentConsentRules()  : mixed
Check if a given string has blocked CSS rules.
isAlreadyBlocked()  : mixed
Check if a given set of HTML attributes already contains the "blocked"-attribute so we can skip duplicate blockages.
isSkipped()  : mixed
Check if given HTML attributes contain a skipper.
revertTransformAttribute()  : mixed
Transform an attribute from `consent-original-%s_` to original attribute name.
skipHtmlTagsInContentBlocker()  : mixed
Transform a set of given HTML tags to be skipped for the complete content blocker.
transformAttribute()  : mixed
Transform an attribute to `consent-original-%s_` attribute.

Methods

hasCssDocumentConsentRules()

Check if a given string has blocked CSS rules.

public static hasCssDocumentConsentRules(string $document) : mixed
Parameters
$document : string

isAlreadyBlocked()

Check if a given set of HTML attributes already contains the "blocked"-attribute so we can skip duplicate blockages.

public static isAlreadyBlocked(array<string|int, string> $attributes) : mixed
Parameters
$attributes : array<string|int, string>

isSkipped()

Check if given HTML attributes contain a skipper.

public static isSkipped(array<string|int, string> $attributes) : mixed
Parameters
$attributes : array<string|int, string>

revertTransformAttribute()

Transform an attribute from `consent-original-%s_` to original attribute name.

public static revertTransformAttribute(string $attribute) : mixed
Parameters
$attribute : string

skipHtmlTagsInContentBlocker()

Transform a set of given HTML tags to be skipped for the complete content blocker.

public static skipHtmlTagsInContentBlocker(string $html[, string $additionalTags = '' ]) : mixed
Parameters
$html : string
$additionalTags : string = ''

transformAttribute()

Transform an attribute to `consent-original-%s_` attribute.

public static transformAttribute(string $attribute[, bool $useClickEvent = false ]) : mixed
Parameters
$attribute : string
$useClickEvent : bool = false

Uses consent-click-original instead of consent-original


        
On this page

Search results