Documentation

NegateBlockable extends AbstractBlockable
in package

Describe a blockable only containing `!` rules (but without `!` so it can match correctly) for `NegatePlugin`.

Table of Contents

Constants

CRITERIA  = 'negate'

Properties

$headlessContentBlocker  : mixed
$originalExpressions  : array<string|int, string>
Original rules from string rules.
$regexp  : mixed
$selectorSyntaxFinder  : array<string|int, SelectorSyntaxFinder>
See `SelectorSyntaxFinder`.

Methods

__construct()  : mixed
C'tor.
appendFromStringArray()  : mixed
Generate the custom element blockers and regular expressions and append it to this blockable instance.
findSelectorSyntaxFinderForMatch()  : mixed
Find a `SyntaxSelectorFinder` for a given `AbstractMatch`.
getBlockerId()  : int|null
Get the blocker ID. This is added as a custom HTML attribute to the blocked element so your frontend can e.g. add a visual content blocker.
getContainsRegularExpressions()  : array<string|int, string>
Getter.
getCriteria()  : string
The criteria type. This is added as a custom HTML attribute to the blocked element so your frontend can determine the origin for the `getRequiredIds`.
getOriginalExpressions()  : array<string|int, string>
Getter.
getRegularExpressions()  : array<string|int, string>
Getter.
getRequiredIds()  : array<string|int, int|string>
Get required IDs. This is added as a custom HTML attribute to the blocked element so your frontend can determine which items by ID are needed so the item can be unblocked.
getSelectorSyntaxFinder()  : mixed
Getter.
hasBlockerId()  : mixed
Determine if this blockable should be blocked.

Constants

Properties

$originalExpressions

Original rules from string rules.

private array<string|int, string> $originalExpressions = []

$selectorSyntaxFinder

See `SelectorSyntaxFinder`.

private array<string|int, SelectorSyntaxFinder> $selectorSyntaxFinder = []

Methods

appendFromStringArray()

Generate the custom element blockers and regular expressions and append it to this blockable instance.

public appendFromStringArray(array<string|int, string> $blockers) : mixed
Parameters
$blockers : array<string|int, string>

findSelectorSyntaxFinderForMatch()

Find a `SyntaxSelectorFinder` for a given `AbstractMatch`.

public findSelectorSyntaxFinderForMatch(AbstractMatch $match) : mixed
Parameters
$match : AbstractMatch

getBlockerId()

Get the blocker ID. This is added as a custom HTML attribute to the blocked element so your frontend can e.g. add a visual content blocker.

public getBlockerId() : int|null
Return values
int|null

getContainsRegularExpressions()

Getter.

public getContainsRegularExpressions() : array<string|int, string>
Return values
array<string|int, string>

getCriteria()

The criteria type. This is added as a custom HTML attribute to the blocked element so your frontend can determine the origin for the `getRequiredIds`.

public getCriteria() : string

E.g. differ between TCF vendors and another custom criteria.

Return values
string

getOriginalExpressions()

Getter.

public getOriginalExpressions() : array<string|int, string>
Return values
array<string|int, string>

getRegularExpressions()

Getter.

public getRegularExpressions() : array<string|int, string>
Return values
array<string|int, string>

getRequiredIds()

Get required IDs. This is added as a custom HTML attribute to the blocked element so your frontend can determine which items by ID are needed so the item can be unblocked.

public getRequiredIds() : array<string|int, int|string>
Return values
array<string|int, int|string>

getSelectorSyntaxFinder()

Getter.

public getSelectorSyntaxFinder() : mixed
Tags
codeCoverageIgnore

hasBlockerId()

Determine if this blockable should be blocked.

public hasBlockerId() : mixed

        
On this page

Search results