Documentation

AbstractMultisite extends BaseSettings
in package

AbstractYes

Abstract implementation of the settings for a multisite network (Consent Forwarding).

Table of Contents

Constants

ALL_ENDPOINT_FILTERS  = [self::ENDPOINT_FILTER_ALL, self::ENDPOINT_FILTER_NOT_CURRENT, self::ENDPOINT_FILTER_ONLY_CURRENT]
ENDPOINT_FILTER_ALL  = 'all'
ENDPOINT_FILTER_NOT_CURRENT  = 'notCurrent'
ENDPOINT_FILTER_ONLY_CURRENT  = 'onlyCurrent'

Properties

$settings  : Settings
See Settings

Methods

getAvailableEndpoints()  : array<string|int, mixed>
Get all available and predefined endpoints within this environment. E. g. if your are running within a mulitisite, you will get all available WP REST API endpoints for each site within this multisite. That means, you need to add your endpoint as follows: `$endpoints["https://example.com/wp-json/real-cookie-banner/v1/consent/forward"] = 'My example'.`
getConfiguredEndpoints()  : array<string|int, string>
Get the available endpoints which are part of this environment and active for the consent forwarding. Examples:
getCrossDomains()  : array<string|int, string>
Get forward to external URLs.
getEnvironmentHost()  : string
Get current host for the current environment where consent is processed.
getExternalHosts()  : array<string|int, string>
Check if external hosts need to be contacted and return the external hosts including subdomain.
getForwardTo()  : array<string|int, string>
Get forward to URLs within the network.
getSettings()  : mixed
Getter.
isConsentForwarding()  : bool
Check if consent should be forwarded.
mapDecisionToUniqueNames()  : array<string|int, string>
Transform a given consent decision (groups with service IDs) to a map of unique names.
mapUniqueNamesToDecision()  : mixed
Transform a given consent decision in string[] (`uniqueName`) to a map of groups with cookie ids.
setSettings()  : mixed
Setter.

Constants

ALL_ENDPOINT_FILTERS

public mixed ALL_ENDPOINT_FILTERS = [self::ENDPOINT_FILTER_ALL, self::ENDPOINT_FILTER_NOT_CURRENT, self::ENDPOINT_FILTER_ONLY_CURRENT]

ENDPOINT_FILTER_NOT_CURRENT

public mixed ENDPOINT_FILTER_NOT_CURRENT = 'notCurrent'

ENDPOINT_FILTER_ONLY_CURRENT

public mixed ENDPOINT_FILTER_ONLY_CURRENT = 'onlyCurrent'

Properties

Methods

getAvailableEndpoints()

Get all available and predefined endpoints within this environment. E. g. if your are running within a mulitisite, you will get all available WP REST API endpoints for each site within this multisite. That means, you need to add your endpoint as follows: `$endpoints["https://example.com/wp-json/real-cookie-banner/v1/consent/forward"] = 'My example'.`

public abstract getAvailableEndpoints([string $filter = self::ENDPOINT_FILTER_ALL ]) : array<string|int, mixed>
Parameters
$filter : string = self::ENDPOINT_FILTER_ALL

Can be all, notCurrent and onlyCurrent

Return values
array<string|int, mixed>

getConfiguredEndpoints()

Get the available endpoints which are part of this environment and active for the consent forwarding. Examples:

public abstract getConfiguredEndpoints() : array<string|int, string>
  • WordPress Multisite: Other subsites within the multisite network
  • WordPress Multilingual: Other URLs to other languages of the current website
Return values
array<string|int, string>

getCrossDomains()

Get forward to external URLs.

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

getEnvironmentHost()

Get current host for the current environment where consent is processed.

public abstract getEnvironmentHost() : string
Return values
string

getExternalHosts()

Check if external hosts need to be contacted and return the external hosts including subdomain.

public getExternalHosts() : array<string|int, string>

Returns false if no external host gets contacted.

Return values
array<string|int, string>

getForwardTo()

Get forward to URLs within the network.

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

getSettings()

Getter.

public getSettings() : mixed
Tags
codeCoverageIgnore

isConsentForwarding()

Check if consent should be forwarded.

public abstract isConsentForwarding() : bool
Return values
bool

mapDecisionToUniqueNames()

Transform a given consent decision (groups with service IDs) to a map of unique names.

public mapDecisionToUniqueNames(array<string|int, mixed> $decision) : array<string|int, string>
Parameters
$decision : array<string|int, mixed>
Return values
array<string|int, string>

mapUniqueNamesToDecision()

Transform a given consent decision in string[] (`uniqueName`) to a map of groups with cookie ids.

public mapUniqueNamesToDecision(array<string|int, string> $uniqueNames) : mixed

It automatically accepts all essential services.

Parameters
$uniqueNames : array<string|int, string>

        
On this page

Search results