Documentation

Blocker
in package

A content blocker definition for a service.

Table of Contents

Constants

CRITERIA_SERVICES  = 'services'
CRITERIA_TCF_VENDORS  = 'tcfVendors'
CRITERIAS  = [self::CRITERIA_SERVICES, self::CRITERIA_TCF_VENDORS]
DEFAULT_CRITERIA  = self::CRITERIA_SERVICES
DEFAULT_VISUAL_CONTENT_TYPE  = self::VISUAL_CONTENT_TYPE_GENERIC
DEFAULT_VISUAL_TYPE  = self::VISUAL_TYPE_DEFAULT
VISUAL_CONTENT_TYPE_AUDIO_PLAYER  = 'audio-player'
VISUAL_CONTENT_TYPE_FEED_TEXT  = 'feed-text'
VISUAL_CONTENT_TYPE_FEED_VIDEO  = 'feed-video'
VISUAL_CONTENT_TYPE_GENERIC  = 'generic'
VISUAL_CONTENT_TYPE_MAP  = 'map'
VISUAL_CONTENT_TYPE_VIDEO_PLAYER  = 'video-player'
VISUAL_CONTENT_TYPES  = [self::VISUAL_CONTENT_TYPE_MAP, self::VISUAL_CONTENT_TYPE_VIDEO_PLAYER, self::VISUAL_CONTENT_TYPE_AUDIO_PLAYER, self::VISUAL_CONTENT_TYPE_FEED_TEXT, self::VISUAL_CONTENT_TYPE_FEED_VIDEO, self::VISUAL_CONTENT_TYPE_GENERIC]
VISUAL_TYPE_DEFAULT  = 'default'
VISUAL_TYPE_HERO  = 'hero'
VISUAL_TYPE_WRAPPED  = 'wrapped'
VISUAL_TYPES  = [self::VISUAL_TYPE_DEFAULT, self::VISUAL_TYPE_WRAPPED, self::VISUAL_TYPE_HERO]

Properties

$criteria  : string
The criterium which resolves the content blocker (e.g. `services` or `tcfVendors`).
$description  : string
The description.
$id  : int
The ID of the content blocker when it got created in a stafeul way.
$isVisual  : bool
Is the content blocker visual?
$isVisualDarkMode  : bool
Apply dark mode to the visual content blocker.
$name  : string
The name.
$presetId  : string
The used preset ID from the service cloud.
$rules  : array<string|int, string>
A list of rules.
$services  : array<string|int, int>
If `$criteria` is `services`, this is the list of needed `Services::$id`'s.
$shouldForceToShowVisual  : bool
Force to show the visual independent of some rules which could potentially disable the visual rendering.
$tcfPurposes  : array<string|int, int>
If `$criteria` is `tcfVendors`, this is the list of needed purposes.
$tcfVendors  : array<string|int, int>
If `$criteria` is `tcfVendors`, this is the list of needed vendor IDs.
$visualBlur  : int
Blur the background image by percentage (e.g. `80`).
$visualContentType  : string
The visual content type (e.g. `map` or `video-player`).
$visualDownloadThumbnail  : bool
Should a background image automatically be downloaded from the blocked URL?
$visualHeroButtonText  : string
The button text for the `hero` content blocker.
$visualMediaThumbnail  : string|int
The conntected visual media ID when the visual type needs a background image.
$visualThumbnail  : VisualThumbnail
See `VisualThumbnail`.
$visualType  : string
Can be `default`, `wrapped` or `hero`.

Methods

fromJson()  : self
Generate a `Blocker` object from an array.
getCriteria()  : mixed
Getter.
getDescription()  : mixed
Getter.
getId()  : mixed
Getter.
getName()  : mixed
Getter.
getPresetId()  : mixed
Getter.
getRules()  : mixed
Getter.
getServices()  : mixed
Getter.
getShouldForceToShowVisual()  : mixed
Getter.
getTcfPurposes()  : mixed
Getter.
getTcfVendors()  : mixed
Getter.
getVisualBlur()  : mixed
Getter.
getVisualContentType()  : mixed
Getter.
getVisualDownloadThumbnail()  : mixed
Getter.
getVisualHeroButtonText()  : mixed
Getter.
getVisualMediaThumbnail()  : mixed
Getter.
getVisualThumbnail()  : mixed
Getter.
getVisualType()  : mixed
Getter.
isVisual()  : mixed
Getter.
isVisualDarkMode()  : mixed
Getter.
setCriteria()  : mixed
Setter.
setDescription()  : mixed
Setter.
setId()  : mixed
Setter.
setIsVisual()  : mixed
Setter.
setIsVisualDarkMode()  : mixed
Setter.
setName()  : mixed
Setter.
setPresetId()  : mixed
Setter.
setRules()  : mixed
Setter.
setServices()  : mixed
Setter.
setShouldForceToShowVisual()  : mixed
Setter.
setTcfPurposes()  : mixed
Setter.
setTcfVendors()  : mixed
Setter.
setVisualBlur()  : mixed
Setter.
setVisualContentType()  : mixed
Setter.
setVisualDownloadThumbnail()  : mixed
Setter.
setVisualHeroButtonText()  : mixed
Setter.
setVisualMediaThumbnail()  : mixed
Setter.
setVisualThumbnail()  : mixed
Setter.
setVisualType()  : mixed
Setter.
toJson()  : mixed
Create a JSON representation of this object.

Constants

CRITERIA_SERVICES

public mixed CRITERIA_SERVICES = 'services'

CRITERIA_TCF_VENDORS

public mixed CRITERIA_TCF_VENDORS = 'tcfVendors'

CRITERIAS

public mixed CRITERIAS = [self::CRITERIA_SERVICES, self::CRITERIA_TCF_VENDORS]

DEFAULT_CRITERIA

public mixed DEFAULT_CRITERIA = self::CRITERIA_SERVICES

DEFAULT_VISUAL_CONTENT_TYPE

public mixed DEFAULT_VISUAL_CONTENT_TYPE = self::VISUAL_CONTENT_TYPE_GENERIC

DEFAULT_VISUAL_TYPE

public mixed DEFAULT_VISUAL_TYPE = self::VISUAL_TYPE_DEFAULT

VISUAL_CONTENT_TYPE_AUDIO_PLAYER

public mixed VISUAL_CONTENT_TYPE_AUDIO_PLAYER = 'audio-player'

VISUAL_CONTENT_TYPE_FEED_TEXT

public mixed VISUAL_CONTENT_TYPE_FEED_TEXT = 'feed-text'

VISUAL_CONTENT_TYPE_FEED_VIDEO

public mixed VISUAL_CONTENT_TYPE_FEED_VIDEO = 'feed-video'

VISUAL_CONTENT_TYPE_GENERIC

public mixed VISUAL_CONTENT_TYPE_GENERIC = 'generic'

VISUAL_CONTENT_TYPE_MAP

public mixed VISUAL_CONTENT_TYPE_MAP = 'map'

VISUAL_CONTENT_TYPE_VIDEO_PLAYER

public mixed VISUAL_CONTENT_TYPE_VIDEO_PLAYER = 'video-player'

VISUAL_CONTENT_TYPES

public mixed VISUAL_CONTENT_TYPES = [self::VISUAL_CONTENT_TYPE_MAP, self::VISUAL_CONTENT_TYPE_VIDEO_PLAYER, self::VISUAL_CONTENT_TYPE_AUDIO_PLAYER, self::VISUAL_CONTENT_TYPE_FEED_TEXT, self::VISUAL_CONTENT_TYPE_FEED_VIDEO, self::VISUAL_CONTENT_TYPE_GENERIC]

VISUAL_TYPE_DEFAULT

public mixed VISUAL_TYPE_DEFAULT = 'default'

VISUAL_TYPE_HERO

public mixed VISUAL_TYPE_HERO = 'hero'

VISUAL_TYPE_WRAPPED

public mixed VISUAL_TYPE_WRAPPED = 'wrapped'

VISUAL_TYPES

public mixed VISUAL_TYPES = [self::VISUAL_TYPE_DEFAULT, self::VISUAL_TYPE_WRAPPED, self::VISUAL_TYPE_HERO]

Properties

$criteria

The criterium which resolves the content blocker (e.g. `services` or `tcfVendors`).

private string $criteria = self::DEFAULT_CRITERIA

$description

The description.

private string $description = ''

$id

The ID of the content blocker when it got created in a stafeul way.

private int $id = 0

$isVisual

Is the content blocker visual?

private bool $isVisual = false

$isVisualDarkMode

Apply dark mode to the visual content blocker.

private bool $isVisualDarkMode = false

$name

The name.

private string $name = ''

$presetId

The used preset ID from the service cloud.

private string $presetId = ''

$rules

A list of rules.

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

$services

If `$criteria` is `services`, this is the list of needed `Services::$id`'s.

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

$shouldForceToShowVisual

Force to show the visual independent of some rules which could potentially disable the visual rendering.

private bool $shouldForceToShowVisual = false

For example, a visual content blocker is never rendered for a <script tag.

$tcfPurposes

If `$criteria` is `tcfVendors`, this is the list of needed purposes.

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

$tcfVendors

If `$criteria` is `tcfVendors`, this is the list of needed vendor IDs.

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

$visualBlur

Blur the background image by percentage (e.g. `80`).

private int $visualBlur = 0

$visualContentType

The visual content type (e.g. `map` or `video-player`).

private string $visualContentType = self::DEFAULT_VISUAL_CONTENT_TYPE

$visualDownloadThumbnail

Should a background image automatically be downloaded from the blocked URL?

private bool $visualDownloadThumbnail = false

$visualHeroButtonText

The button text for the `hero` content blocker.

private string $visualHeroButtonText = ''

$visualMediaThumbnail

The conntected visual media ID when the visual type needs a background image.

private string|int $visualMediaThumbnail = 0

$visualType

Can be `default`, `wrapped` or `hero`.

private string $visualType = self::DEFAULT_VISUAL_TYPE

Methods

fromJson()

Generate a `Blocker` object from an array.

public static fromJson(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>
Return values
self

getCriteria()

Getter.

public getCriteria() : mixed
Tags
codeCoverageIgnore

getDescription()

Getter.

public getDescription() : mixed
Tags
codeCoverageIgnore

getId()

Getter.

public getId() : mixed
Tags
codeCoverageIgnore

getName()

Getter.

public getName() : mixed
Tags
codeCoverageIgnore

getPresetId()

Getter.

public getPresetId() : mixed
Tags
codeCoverageIgnore

getRules()

Getter.

public getRules() : mixed
Tags
codeCoverageIgnore

getServices()

Getter.

public getServices() : mixed
Tags
codeCoverageIgnore

getShouldForceToShowVisual()

Getter.

public getShouldForceToShowVisual() : mixed
Tags
codeCoverageIgnore

getTcfPurposes()

Getter.

public getTcfPurposes() : mixed
Tags
codeCoverageIgnore

getTcfVendors()

Getter.

public getTcfVendors() : mixed
Tags
codeCoverageIgnore

getVisualBlur()

Getter.

public getVisualBlur() : mixed
Tags
codeCoverageIgnore

getVisualContentType()

Getter.

public getVisualContentType() : mixed
Tags
codeCoverageIgnore

getVisualDownloadThumbnail()

Getter.

public getVisualDownloadThumbnail() : mixed
Tags
codeCoverageIgnore

getVisualHeroButtonText()

Getter.

public getVisualHeroButtonText() : mixed
Tags
codeCoverageIgnore

getVisualMediaThumbnail()

Getter.

public getVisualMediaThumbnail() : mixed
Tags
codeCoverageIgnore

getVisualThumbnail()

Getter.

public getVisualThumbnail() : mixed
Tags
codeCoverageIgnore

getVisualType()

Getter.

public getVisualType() : mixed
Tags
codeCoverageIgnore

isVisual()

Getter.

public isVisual() : mixed
Tags
codeCoverageIgnore

isVisualDarkMode()

Getter.

public isVisualDarkMode() : mixed
Tags
codeCoverageIgnore

setCriteria()

Setter.

public setCriteria(string $criteria) : mixed
Parameters
$criteria : string
Tags
codecoverageignore

setDescription()

Setter.

public setDescription(string $description) : mixed
Parameters
$description : string
Tags
codecoverageignore

setId()

Setter.

public setId(int $id) : mixed
Parameters
$id : int
Tags
codecoverageignore

setIsVisual()

Setter.

public setIsVisual(bool $isVisual) : mixed
Parameters
$isVisual : bool
Tags
codecoverageignore

setIsVisualDarkMode()

Setter.

public setIsVisualDarkMode(bool $isVisualDarkMode) : mixed
Parameters
$isVisualDarkMode : bool
Tags
codecoverageignore

setName()

Setter.

public setName(string $name) : mixed
Parameters
$name : string
Tags
codecoverageignore

setPresetId()

Setter.

public setPresetId(string $presetId) : mixed
Parameters
$presetId : string
Tags
codecoverageignore

setRules()

Setter.

public setRules(array<string|int, string> $rules) : mixed
Parameters
$rules : array<string|int, string>
Tags
codecoverageignore

setServices()

Setter.

public setServices(array<string|int, int> $services) : mixed
Parameters
$services : array<string|int, int>
Tags
codecoverageignore

setShouldForceToShowVisual()

Setter.

public setShouldForceToShowVisual(bool $shouldForceToShowVisual) : mixed
Parameters
$shouldForceToShowVisual : bool
Tags
codecoverageignore

setTcfPurposes()

Setter.

public setTcfPurposes(array<string|int, int> $tcfPurposes) : mixed
Parameters
$tcfPurposes : array<string|int, int>
Tags
codecoverageignore

setTcfVendors()

Setter.

public setTcfVendors(array<string|int, int> $tcfVendors) : mixed
Parameters
$tcfVendors : array<string|int, int>
Tags
codecoverageignore

setVisualBlur()

Setter.

public setVisualBlur(int $visualBlur) : mixed
Parameters
$visualBlur : int
Tags
codecoverageignore

setVisualContentType()

Setter.

public setVisualContentType(string $visualContentType) : mixed
Parameters
$visualContentType : string
Tags
codecoverageignore

setVisualDownloadThumbnail()

Setter.

public setVisualDownloadThumbnail(bool $visualDownloadThumbnail) : mixed
Parameters
$visualDownloadThumbnail : bool
Tags
codecoverageignore

setVisualHeroButtonText()

Setter.

public setVisualHeroButtonText(string $visualHeroButtonText) : mixed
Parameters
$visualHeroButtonText : string
Tags
codecoverageignore

setVisualMediaThumbnail()

Setter.

public setVisualMediaThumbnail(string|int $visualMediaThumbnail) : mixed
Parameters
$visualMediaThumbnail : string|int
Tags
codecoverageignore

setVisualType()

Setter.

public setVisualType(string $visualType) : mixed
Parameters
$visualType : string
Tags
codecoverageignore

toJson()

Create a JSON representation of this object.

public toJson() : mixed

        
On this page

Search results