General
        
        extends AbstractGeneral
    
    
            
            in package
            
        
    
            
            implements
                            IOverrideGeneral                    
    
            
            Uses
                            General,                             UtilsProvider                    
    
General settings.
Table of Contents
Interfaces
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
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
    
    
    
DEFAULT_COOKIE_POLICY_ID
    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'
    
    
    
LEGAL_BASIS_ALLOWED
    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'
    
    
    
SETTING_COOKIE_POLICY_ID
    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'
    
    
    
SETTING_TERRITORIAL_LEGAL_BASIS
    public
        mixed
    SETTING_TERRITORIAL_LEGAL_BASIS
    = RCB_OPT_PREFIX . '-territorial-legal-basis'
    
    
    
TERRITORIAL_LEGAL_BASIS_DSG_SWITZERLAND
    public
        mixed
    TERRITORIAL_LEGAL_BASIS_DSG_SWITZERLAND
    = 'dsg-switzerland'
    
    
    
TERRITORIAL_LEGAL_BASIS_GDPR
    public
        mixed
    TERRITORIAL_LEGAL_BASIS_GDPR
    = 'gdpr-eprivacy'
    
    
    
Properties
$me
Singleton instance.
    private
    static    General
    $me
     = null
    
    
    
$settings
See Settings
    private
        Settings
    $settings
    
    
    
    
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>getBannerLinks()
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
intgetCookiePolicyUrl()
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
Return values
GeneralgetLanguages()
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
stringgetOperatorContactEmail()
Get configured operator contact email.
    public
                    getOperatorContactEmail() : string
    Return values
stringgetOperatorContactFormId()
Get the operator contact form page ID.
    public
                    getOperatorContactFormId() : int
    Return values
intgetOperatorContactFormUrl()
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
stringgetOperatorCountry()
Get configured operator country.
    public
                    getOperatorCountry() : string
    Return values
stringgetPluginConstantPrefix()
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
    public
                    getPluginConstantPrefix() : string
    Tags
Return values
stringgetServiceGroups()
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
stringgetSettings()
Getter.
    public
                    getSettings() : mixed
    Tags
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
boolisBlockerActive()
Is the content blocker active?
    public
                    isBlockerActive() : bool
    Return values
booloverrideEnableOptionsAutoload()
    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