Documentation

General extends AbstractGeneral
in package
implements IOverrideGeneral Uses General, UtilsProvider

General settings.

Table of Contents

Interfaces

IOverrideGeneral

Constants

DEFAULT_BANNER_ACTIVE  = false
DEFAULT_BLOCKER_ACTIVE  = true
DEFAULT_COOKIE_POLICY_ID  = 0
DEFAULT_HIDE_PAGE_IDS  = ''
DEFAULT_OPERATOR_CONTACT_ADDRESS  = ''
DEFAULT_OPERATOR_CONTACT_EMAIL  = ''
DEFAULT_OPERATOR_CONTACT_FORM_ID  = 0
DEFAULT_OPERATOR_CONTACT_PHONE  = ''
DEFAULT_SET_COOKIES_VIA_MANAGER  = 'none'
LEGAL_BASIS_ALLOWED  = [self::TERRITORIAL_LEGAL_BASIS_GDPR, self::TERRITORIAL_LEGAL_BASIS_DSG_SWITZERLAND]
OPTION_GROUP  = 'options'
SETTING_BANNER_ACTIVE  = RCB_OPT_PREFIX . '-banner-active'
SETTING_BLOCKER_ACTIVE  = RCB_OPT_PREFIX . '-blocker-active'
SETTING_COOKIE_POLICY_ID  = RCB_OPT_PREFIX . '-cookie-policy-id'
SETTING_HIDE_PAGE_IDS  = RCB_OPT_PREFIX . '-hide-page-ids'
SETTING_OPERATOR_CONTACT_ADDRESS  = RCB_OPT_PREFIX . '-operator-contact-address'
SETTING_OPERATOR_CONTACT_EMAIL  = RCB_OPT_PREFIX . '-operator-contact-email'
SETTING_OPERATOR_CONTACT_FORM_ID  = RCB_OPT_PREFIX . '-operator-contact-form-id'
SETTING_OPERATOR_CONTACT_PHONE  = RCB_OPT_PREFIX . '-operator-contact-phone'
SETTING_OPERATOR_COUNTRY  = RCB_OPT_PREFIX . '-operator-country'
SETTING_SET_COOKIES_VIA_MANAGER  = RCB_OPT_PREFIX . '-set-cookies-via-manager'
SETTING_TERRITORIAL_LEGAL_BASIS  = RCB_OPT_PREFIX . '-territorial-legal-basis'
TERRITORIAL_LEGAL_BASIS_DSG_SWITZERLAND  = 'dsg-switzerland'
TERRITORIAL_LEGAL_BASIS_GDPR  = 'gdpr-eprivacy'

Properties

$me  : General
Singleton instance.
$settings  : Settings
See Settings

Methods

before_delete_post()  : mixed
When a page gets deleted, check if the value is our configured contact form page and reset the value accordingly.
enableOptionsAutoload()  : mixed
Initially `add_option` to avoid autoloading issues.
getAdditionalPageHideIds()  : array<string|int, int>
Get an array of hidden page ids (not imprint and privacy policy, there are own options!).
getBannerLinks()  : array<string|int, BannerLink>
Get the list of banner links which should be shown in cookie banner and content blocker.
getBlocker()  : array<string|int, Blocker>
Get the list of content blockers.
getCookiePolicyId()  : int
Get the cookie policy page ID.
getCookiePolicyUrl()  : mixed
Get the cookie policy page URL.
getDefaultOperatorContactEmail()  : mixed
Get default operator contact email.
getDefaultOperatorCountry()  : mixed
Get default operator country. We try to calculate the country from the blog language.
getDefaultPrivacyPolicy()  : mixed
Get default privacy policy post ID.
getDefaultTerritorialLegalBasis()  : mixed
Get default territorial legal basis.
getEssentialServiceGroup()  : mixed
Get the essential service groups.
getInstance()  : General
Get singleton instance.
getLanguages()  : array<string|int, Language>
Get the list of languages in which this website is reachable. This is also used for the language switcher.
getNonDefaultServiceGroups()  : array<string|int, ServiceGroup>
Get the list of service groups and their services which are not created by default (custom groups).
getOperatorContactAddress()  : string
Get configured operator contact address.
getOperatorContactEmail()  : string
Get configured operator contact email.
getOperatorContactFormId()  : int
Get the operator contact form page ID.
getOperatorContactFormUrl()  : mixed
Get the operator contact form page URL.
getOperatorContactPhone()  : string
Get configured operator contact phone.
getOperatorCountry()  : string
Get configured operator country.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
getServiceGroups()  : array<string|int, ServiceGroup>
Get the list of service groups and their services.
getSetCookiesViaManager()  : string
Get the option "Load services after consent via".
getSettings()  : mixed
Getter.
getTerritorialLegalBasis()  : array<string|int, string>
Get configured legal basis.
isBannerActive()  : bool
Is the banner active?
isBlockerActive()  : bool
Is the content blocker active?
overrideEnableOptionsAutoload()  : mixed
overrideRegister()  : mixed
register()  : mixed
Register settings.
setSettings()  : mixed
Setter.
__construct()  : mixed
C'tor.

Constants

DEFAULT_BANNER_ACTIVE

public mixed DEFAULT_BANNER_ACTIVE = false

DEFAULT_BLOCKER_ACTIVE

public mixed DEFAULT_BLOCKER_ACTIVE = true
public mixed DEFAULT_COOKIE_POLICY_ID = 0

DEFAULT_HIDE_PAGE_IDS

public mixed DEFAULT_HIDE_PAGE_IDS = ''

DEFAULT_OPERATOR_CONTACT_ADDRESS

public mixed DEFAULT_OPERATOR_CONTACT_ADDRESS = ''

DEFAULT_OPERATOR_CONTACT_EMAIL

public mixed DEFAULT_OPERATOR_CONTACT_EMAIL = ''

DEFAULT_OPERATOR_CONTACT_FORM_ID

public mixed DEFAULT_OPERATOR_CONTACT_FORM_ID = 0

DEFAULT_OPERATOR_CONTACT_PHONE

public mixed DEFAULT_OPERATOR_CONTACT_PHONE = ''

DEFAULT_SET_COOKIES_VIA_MANAGER

public mixed DEFAULT_SET_COOKIES_VIA_MANAGER = 'none'
public mixed LEGAL_BASIS_ALLOWED = [self::TERRITORIAL_LEGAL_BASIS_GDPR, self::TERRITORIAL_LEGAL_BASIS_DSG_SWITZERLAND]

OPTION_GROUP

public mixed OPTION_GROUP = 'options'

SETTING_BANNER_ACTIVE

public mixed SETTING_BANNER_ACTIVE = RCB_OPT_PREFIX . '-banner-active'

SETTING_BLOCKER_ACTIVE

public mixed SETTING_BLOCKER_ACTIVE = RCB_OPT_PREFIX . '-blocker-active'
public mixed SETTING_COOKIE_POLICY_ID = RCB_OPT_PREFIX . '-cookie-policy-id'

SETTING_HIDE_PAGE_IDS

public mixed SETTING_HIDE_PAGE_IDS = RCB_OPT_PREFIX . '-hide-page-ids'

SETTING_OPERATOR_CONTACT_ADDRESS

public mixed SETTING_OPERATOR_CONTACT_ADDRESS = RCB_OPT_PREFIX . '-operator-contact-address'

SETTING_OPERATOR_CONTACT_EMAIL

public mixed SETTING_OPERATOR_CONTACT_EMAIL = RCB_OPT_PREFIX . '-operator-contact-email'

SETTING_OPERATOR_CONTACT_FORM_ID

public mixed SETTING_OPERATOR_CONTACT_FORM_ID = RCB_OPT_PREFIX . '-operator-contact-form-id'

SETTING_OPERATOR_CONTACT_PHONE

public mixed SETTING_OPERATOR_CONTACT_PHONE = RCB_OPT_PREFIX . '-operator-contact-phone'

SETTING_OPERATOR_COUNTRY

public mixed SETTING_OPERATOR_COUNTRY = RCB_OPT_PREFIX . '-operator-country'

SETTING_SET_COOKIES_VIA_MANAGER

public mixed SETTING_SET_COOKIES_VIA_MANAGER = RCB_OPT_PREFIX . '-set-cookies-via-manager'
public mixed SETTING_TERRITORIAL_LEGAL_BASIS = RCB_OPT_PREFIX . '-territorial-legal-basis'
public mixed TERRITORIAL_LEGAL_BASIS_DSG_SWITZERLAND = 'dsg-switzerland'
public mixed TERRITORIAL_LEGAL_BASIS_GDPR = 'gdpr-eprivacy'

Properties

Methods

before_delete_post()

When a page gets deleted, check if the value is our configured contact form page and reset the value accordingly.

public before_delete_post(number $postId) : mixed

Why using before_delete_post instead of delete_post? We are deleting also translations in PolyLang/WPML and we need to do this before the deletion process is done.

Parameters
$postId : number

enableOptionsAutoload()

Initially `add_option` to avoid autoloading issues.

public enableOptionsAutoload() : mixed

getAdditionalPageHideIds()

Get an array of hidden page ids (not imprint and privacy policy, there are own options!).

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

Get the list of banner links which should be shown in cookie banner and content blocker.

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

getBlocker()

Get the list of content blockers.

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

getCookiePolicyId()

Get the cookie policy page ID.

public getCookiePolicyId() : int
Return values
int

getCookiePolicyUrl()

Get the cookie policy page URL.

public getCookiePolicyUrl([mixed $default = false ]) : mixed
Parameters
$default : mixed = false

getDefaultOperatorContactEmail()

Get default operator contact email.

public getDefaultOperatorContactEmail() : mixed

getDefaultOperatorCountry()

Get default operator country. We try to calculate the country from the blog language.

public getDefaultOperatorCountry() : mixed

getDefaultPrivacyPolicy()

Get default privacy policy post ID.

public getDefaultPrivacyPolicy() : mixed

getDefaultTerritorialLegalBasis()

Get default territorial legal basis.

public getDefaultTerritorialLegalBasis() : mixed

getEssentialServiceGroup()

Get the essential service groups.

public getEssentialServiceGroup() : mixed

getInstance()

Get singleton instance.

public static getInstance() : General
Tags
codeCoverageIgnore
Return values
General

getLanguages()

Get the list of languages in which this website is reachable. This is also used for the language switcher.

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

getNonDefaultServiceGroups()

Get the list of service groups and their services which are not created by default (custom groups).

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

getOperatorContactAddress()

Get configured operator contact address.

public getOperatorContactAddress() : string
Return values
string

getOperatorContactEmail()

Get configured operator contact email.

public getOperatorContactEmail() : string
Return values
string

getOperatorContactFormId()

Get the operator contact form page ID.

public getOperatorContactFormId() : int
Return values
int

getOperatorContactFormUrl()

Get the operator contact form page URL.

public getOperatorContactFormUrl([mixed $default = false ]) : mixed
Parameters
$default : mixed = false

getOperatorContactPhone()

Get configured operator contact phone.

public getOperatorContactPhone() : string
Return values
string

getOperatorCountry()

Get configured operator country.

public getOperatorCountry() : string
Return values
string

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

getServiceGroups()

Get the list of service groups and their services.

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

getSetCookiesViaManager()

Get the option "Load services after consent via".

public abstract getSetCookiesViaManager() : string
Return values
string

getSettings()

Getter.

public getSettings() : mixed
Tags
codeCoverageIgnore

getTerritorialLegalBasis()

Get configured legal basis.

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

isBannerActive()

Is the banner active?

public isBannerActive() : bool
Return values
bool

isBlockerActive()

Is the content blocker active?

public isBlockerActive() : bool
Return values
bool

overrideEnableOptionsAutoload()

public overrideEnableOptionsAutoload() : mixed

overrideRegister()

public overrideRegister() : mixed

register()

Register settings.

public register() : mixed

__construct()

C'tor.

private __construct() : mixed

        
On this page

Search results