Documentation

Reset
in package
Uses UtilsProvider

Allows to reset all data of RCB including cookies, options, and cookie groups.

Table of Contents

Constants

CUSTOMIZER_TEXTS  = [\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DESCRIPTION, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ALL, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ESSENTIALS, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_INDIVIDUAL, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DATA_PROCESSING_IN_UNSAFE_COUNTRIES, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE_BLOCKER, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_LIST_SERVICES_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_LIST_LEGITIMATE_INTEREST_SERVICES_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_CONSENT_FORWARDING, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LINK_SHOW_MISSING, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LOAD_BUTTON, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_ACCEPT_INFO, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_STICKY_CHANGE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_STICKY_HISTORY, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_STICKY_REVOKE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_STICKY_REVOKE_SUCCESS_MESSAGE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_DESCRIPTION, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SAVE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SHOW_MORE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HIDE_MORE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_POSTAMBLE, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_INSTRUCTION, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_TABLE_OF_CONTENTS, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_CONTROLLER_OF_WEBSITE, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_DIFF_TO_PRIVACY_POLICY, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_COOKIE_TECHNOLOGY, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_LEGAL_BASIS, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_RIGHTS_OF_THE_VISITOR, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_MANAGE_COOKIES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_TYPES_OF_COOKIES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_COOKIE_ORIGIN, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_LIST_OF_SERVICES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_DIFF_TO_PRIVACY_POLICY, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_COOKIE_TECHNOLOGY, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_LEGAL_BASIS_GDPR, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_LEGAL_BASIS_DSG, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_RIGHTS_OF_THE_VISITOR, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_MANAGE_COOKIES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_TYPES_OF_COOKIES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_COOKIE_ORIGIN, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_ADDITIONAL_CONTENT]

Properties

$me  : Reset
Singleton instance.

Methods

all()  : mixed
Clear all data.
getInstance()  : Reset
Get singleton instance.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
texts()  : mixed
Reset texts for customizer, service groups, services and content blockers.
textsCustomizer()  : mixed
Reset customizer texts.
textsGenericTemplates()  : mixed
Reset texts for generic templates. This currently supports only services and blockers.
textsServiceGroups()  : mixed
Reset service groups texts for the current running context.
__construct()  : mixed
C'tor.

Constants

CUSTOMIZER_TEXTS

public mixed CUSTOMIZER_TEXTS = [\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DESCRIPTION, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ALL, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ESSENTIALS, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_INDIVIDUAL, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DATA_PROCESSING_IN_UNSAFE_COUNTRIES, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE_BLOCKER, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_LIST_SERVICES_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_LIST_LEGITIMATE_INTEREST_SERVICES_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_CONSENT_FORWARDING, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LINK_SHOW_MISSING, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LOAD_BUTTON, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_ACCEPT_INFO, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_STICKY_CHANGE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_STICKY_HISTORY, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_STICKY_REVOKE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_STICKY_REVOKE_SUCCESS_MESSAGE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_DESCRIPTION, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SAVE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SHOW_MORE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HIDE_MORE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_POSTAMBLE, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_INSTRUCTION, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_TABLE_OF_CONTENTS, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_CONTROLLER_OF_WEBSITE, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_DIFF_TO_PRIVACY_POLICY, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_COOKIE_TECHNOLOGY, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_LEGAL_BASIS, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_RIGHTS_OF_THE_VISITOR, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_MANAGE_COOKIES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_TYPES_OF_COOKIES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_COOKIE_ORIGIN, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_HEADLINE_LIST_OF_SERVICES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_DIFF_TO_PRIVACY_POLICY, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_COOKIE_TECHNOLOGY, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_LEGAL_BASIS_GDPR, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_LEGAL_BASIS_DSG, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_RIGHTS_OF_THE_VISITOR, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_MANAGE_COOKIES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_TYPES_OF_COOKIES, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_COOKIE_ORIGIN, \DevOwl\RealCookieBanner\view\customize\banner\CookiePolicy::SETTING_ADDITIONAL_CONTENT]

Properties

$me

Singleton instance.

private static Reset $me = null

Methods

all()

Clear all data.

public all([bool $purgeConsents = false ]) : mixed
Parameters
$purgeConsents : bool = false

getInstance()

Get singleton instance.

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

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

texts()

Reset texts for customizer, service groups, services and content blockers.

public texts([array<string|int, string> $languages = null ][, array<string|int, string> &$dry = null ]) : mixed
Parameters
$languages : array<string|int, string> = null
$dry : array<string|int, string> = null

Pass an empty array. Then, no text is reset the array gets filled with languages which have translations available to reset

textsCustomizer()

Reset customizer texts.

protected textsCustomizer(array<string|int, string> $languages, array<string|int, string> &$resetTranslationPairs) : mixed
Parameters
$languages : array<string|int, string>
$resetTranslationPairs : array<string|int, string>

textsGenericTemplates()

Reset texts for generic templates. This currently supports only services and blockers.

protected textsGenericTemplates(array<string|int, string> $languages, string $cpt, array<string|int, string> $translatableMetaKeys, array<string|int, string> &$resetTranslationPairs, string $defaultLanguageWpCompatible, array<string|int, mixed> &$dry) : mixed
Parameters
$languages : array<string|int, string>
$cpt : string
$translatableMetaKeys : array<string|int, string>
$resetTranslationPairs : array<string|int, string>
$defaultLanguageWpCompatible : string

Depending on the current language, the translations for the default language should be persisted in $resetTranslationPairs.

$dry : array<string|int, mixed>

textsServiceGroups()

Reset service groups texts for the current running context.

protected textsServiceGroups(array<string|int, string> &$resetTranslationPairs, array<string|int, string> $persistForLanguages) : mixed
Parameters
$resetTranslationPairs : array<string|int, string>
$persistForLanguages : array<string|int, string>

A set of languages for which the translations should be persisted in $resetTranslationPairs, this is only relevant for output buffer plugins.

__construct()

C'tor.

private __construct() : mixed

        
On this page

Search results