GoogleConsentMode
extends AbstractGoogleConsentMode
in package
implements
IOverrideGoogleConsentMode
Uses
GoogleConsentMode, UtilsProvider
Google Consent Mode settings.
Table of Contents
Interfaces
Constants
- DEFAULT_GCM_ADDITIONAL_URL_PARAMETERS = false
- DEFAULT_GCM_ENABLED = false
- DEFAULT_GCM_GTM_INTEGRATION = false
- DEFAULT_GCM_LIST_PURPOSES = true
- DEFAULT_GCM_REDACT_DATA_WITHOUT_CONSENT = true
- DEFAULT_GCM_SHOW_RECOMMONDATIONS_WITHOUT_CONSENT = false
- OPTION_GROUP = 'options'
- SETTING_GCM_ADDITIONAL_URL_PARAMETERS = RCB_OPT_PREFIX . '-gcm-additional-url-parameters'
- SETTING_GCM_ENABLED = RCB_OPT_PREFIX . '-gcm'
- SETTING_GCM_LIST_PURPOSES = RCB_OPT_PREFIX . '-gcm-list-purposes'
- SETTING_GCM_REDACT_DATA_WITHOUT_CONSENT = RCB_OPT_PREFIX . '-gcm-redact-without-consent'
- SETTING_GCM_SHOW_RECOMMONDATIONS_WITHOUT_CONSENT = RCB_OPT_PREFIX . '-gcm-recommandations'
Properties
- $me : GoogleConsentMode
- Singleton instance.
- $settings : Settings
- See Settings
Methods
- calculateRecommandations() : mixed
- Calculate some recommendations depending on the available services and if GCM is active or not.
- enableOptionsAutoload() : mixed
- Initially `add_option` to avoid autoloading issues.
- getConsentModes() : mixed
- Get the consent modes as array.
- getInstance() : GoogleConsentMode
- Get singleton instance.
- getPluginConstantPrefix() : string
- Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
- getSettings() : mixed
- Getter.
- isCollectAdditionalDataViaUrlParameters() : bool
- Check if collect additional data via URL parameters is enabled.
- isEnabled() : bool
- Check if compatibility is enabled.
- isListPurposes() : bool
- Naming of requested consent types in first view.
- isRedactAdsDataWithoutConsent() : bool
- Check if collect additional data via URL parameters is enabled.
- isShowRecommandationsWithoutConsent() : bool
- Check if show recommendations for using Google services without consent is enabled.
- localize() : mixed
- Localize frontend.
- overrideEnableOptionsAutoload() : mixed
- overrideRegister() : mixed
- register() : mixed
- Register settings.
- setSettings() : mixed
- Setter.
- __construct() : mixed
- C'tor.
Constants
DEFAULT_GCM_ADDITIONAL_URL_PARAMETERS
public
mixed
DEFAULT_GCM_ADDITIONAL_URL_PARAMETERS
= false
DEFAULT_GCM_ENABLED
public
mixed
DEFAULT_GCM_ENABLED
= false
DEFAULT_GCM_GTM_INTEGRATION
public
mixed
DEFAULT_GCM_GTM_INTEGRATION
= false
DEFAULT_GCM_LIST_PURPOSES
public
mixed
DEFAULT_GCM_LIST_PURPOSES
= true
DEFAULT_GCM_REDACT_DATA_WITHOUT_CONSENT
public
mixed
DEFAULT_GCM_REDACT_DATA_WITHOUT_CONSENT
= true
DEFAULT_GCM_SHOW_RECOMMONDATIONS_WITHOUT_CONSENT
public
mixed
DEFAULT_GCM_SHOW_RECOMMONDATIONS_WITHOUT_CONSENT
= false
OPTION_GROUP
public
mixed
OPTION_GROUP
= 'options'
SETTING_GCM_ADDITIONAL_URL_PARAMETERS
public
mixed
SETTING_GCM_ADDITIONAL_URL_PARAMETERS
= RCB_OPT_PREFIX . '-gcm-additional-url-parameters'
SETTING_GCM_ENABLED
public
mixed
SETTING_GCM_ENABLED
= RCB_OPT_PREFIX . '-gcm'
SETTING_GCM_LIST_PURPOSES
public
mixed
SETTING_GCM_LIST_PURPOSES
= RCB_OPT_PREFIX . '-gcm-list-purposes'
SETTING_GCM_REDACT_DATA_WITHOUT_CONSENT
public
mixed
SETTING_GCM_REDACT_DATA_WITHOUT_CONSENT
= RCB_OPT_PREFIX . '-gcm-redact-without-consent'
SETTING_GCM_SHOW_RECOMMONDATIONS_WITHOUT_CONSENT
public
mixed
SETTING_GCM_SHOW_RECOMMONDATIONS_WITHOUT_CONSENT
= RCB_OPT_PREFIX . '-gcm-recommandations'
Properties
$me
Singleton instance.
private
static GoogleConsentMode
$me
= null
$settings
See Settings
private
Settings
$settings
Methods
calculateRecommandations()
Calculate some recommendations depending on the available services and if GCM is active or not.
public
calculateRecommandations([bool $dismissedNoConsentTypes = false ][, array<string|int, int> $dismissedNoLegitimateInterest = [] ][, array<string|int, string> $dismissedRequiringGcmActive = [] ]) : mixed
Parameters
- $dismissedNoConsentTypes : bool = false
- $dismissedNoLegitimateInterest : array<string|int, int> = []
- $dismissedRequiringGcmActive : array<string|int, string> = []
enableOptionsAutoload()
Initially `add_option` to avoid autoloading issues.
public
enableOptionsAutoload() : mixed
getConsentModes()
Get the consent modes as array.
public
getConsentModes() : mixed
getInstance()
Get singleton instance.
public
static getInstance() : GoogleConsentMode
Tags
Return values
GoogleConsentModegetPluginConstantPrefix()
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
public
getPluginConstantPrefix() : string
Tags
Return values
stringgetSettings()
Getter.
public
getSettings() : mixed
Tags
isCollectAdditionalDataViaUrlParameters()
Check if collect additional data via URL parameters is enabled.
public
abstract isCollectAdditionalDataViaUrlParameters() : bool
Return values
boolisEnabled()
Check if compatibility is enabled.
public
abstract isEnabled() : bool
Return values
boolisListPurposes()
Naming of requested consent types in first view.
public
abstract isListPurposes() : bool
Return values
boolisRedactAdsDataWithoutConsent()
Check if collect additional data via URL parameters is enabled.
public
abstract isRedactAdsDataWithoutConsent() : bool
Return values
boolisShowRecommandationsWithoutConsent()
Check if show recommendations for using Google services without consent is enabled.
public
abstract isShowRecommandationsWithoutConsent() : bool
Return values
boollocalize()
Localize frontend.
public
localize(array<string|int, mixed> $arr, string $context) : mixed
Parameters
- $arr : array<string|int, mixed>
- $context : string
overrideEnableOptionsAutoload()
public
overrideEnableOptionsAutoload() : mixed
overrideRegister()
public
overrideRegister() : mixed
register()
Register settings.
public
register() : mixed
setSettings()
Setter.
public
setSettings(Settings $settings) : mixed
Parameters
- $settings : Settings
Tags
__construct()
C'tor.
private
__construct() : mixed