Revision
    
            
            in package
            
        
    
    
    
A revision is a document of all settings at the time of consent.
What does "independent" in context to "Revision" mean? There are two types of revisions, the independent one holds all settings and data which would not lead to a new required consent on the frontend for the cookie banner. On the other side, when a non-independent setting and data changes, this needs a new consent from the website visitor on the frontend.
Table of Contents
Constants
- TCF_VENDOR_INDEPENDENT_KEYS = ['deviceStorageDisclosure']
- TYPE_ALL = 'all'
- TYPE_INDEPENDENT = 'independent'
- TYPE_REQUIRE_NEW_CONSENT = 'dependent'
Properties
- $cookieConsentManagement : CookieConsentManagement
- See `CookieConsentManagement`.
- $persistence : AbstractRevisionPersistance
- See `AbstractRevisionPersistance`.
Methods
- __construct() : mixed
- C'tor.
- bannerLinkToJson() : array<string|int, array<string|int, mixed>>
- All banner links as JSON representation.
- blockersToJson() : array<string|int, array<string|int, mixed>>
- All content blockers as JSON representation.
- create() : array<string|int, mixed>
- Create a MD5 hash from all available options and settings, save also as "current revision" if necessery.
- createIndependent() : array<string|int, mixed>
- Create a MD5 hash from all available options and settings which do not require a new consent (independent).
- getCookieConsentManagement() : mixed
- Getter.
- getEnsuredCurrentHash() : string
- Get the current active revision. If there is not current revision (only after activating the plugin itself), the current revision hash gets calculated from current settings.
- getPersistence() : mixed
- Getter.
- nonVisualBlockersToJson() : array<string|int, array<string|int, mixed>>
- All non-visual content blockers as they should require a new consent.
- optionsToJson() : mixed
- Get settings as array object so it can be used within e.g. JSON or serialize to the frontend.
- prepareJsonForFrontend() : mixed
- Prepare a revision JSON for frontend.
- serviceGroupsToJson() : array<string|int, array<string|int, mixed>>
- All service groups as JSON representation.
- tcfMetadataToJson() : mixed
- TCF metadata to array.
- tcfToJson() : mixed
- TCF data (vendors, declarations, stacks, ...) to array.
- websiteOperatorToJson() : mixed
- Operator as own object as it is needed in this format for `@devowl-wp/react-cookie-banner`.
Constants
TCF_VENDOR_INDEPENDENT_KEYS
    public
        mixed
    TCF_VENDOR_INDEPENDENT_KEYS
    = ['deviceStorageDisclosure']
    
    
    
TYPE_ALL
    public
        mixed
    TYPE_ALL
    = 'all'
    
    
    
TYPE_INDEPENDENT
    public
        mixed
    TYPE_INDEPENDENT
    = 'independent'
    
    
    
TYPE_REQUIRE_NEW_CONSENT
    public
        mixed
    TYPE_REQUIRE_NEW_CONSENT
    = 'dependent'
    
    
    
Properties
$cookieConsentManagement
See `CookieConsentManagement`.
    private
        CookieConsentManagement
    $cookieConsentManagement
    
    
    
    
$persistence
See `AbstractRevisionPersistance`.
    private
        AbstractRevisionPersistance
    $persistence
    
    
    
    
Methods
__construct()
C'tor.
    public
                    __construct(CookieConsentManagement $cookieConsentManagement, AbstractRevisionPersistance $persistence) : mixed
    Parameters
- $cookieConsentManagement : CookieConsentManagement
- $persistence : AbstractRevisionPersistance
bannerLinkToJson()
All banner links as JSON representation.
    public
                    bannerLinkToJson() : array<string|int, array<string|int, mixed>>
    Return values
array<string|int, array<string|int, mixed>>blockersToJson()
All content blockers as JSON representation.
    public
                    blockersToJson() : array<string|int, array<string|int, mixed>>
    Return values
array<string|int, array<string|int, mixed>>create()
Create a MD5 hash from all available options and settings, save also as "current revision" if necessery.
    public
                    create([bool|string $persist = false ][, bool $forceNewConsent = true ]) : array<string|int, mixed>
    If the hash differs, a new consent is needed!
Parameters
- $persist : bool|string = false
- 
                    Persist the revision in database, pass forceto force-write into the database
- $forceNewConsent : bool = true
Return values
array<string|int, mixed> —'revision' and 'hash'
createIndependent()
Create a MD5 hash from all available options and settings which do not require a new consent (independent).
    public
                    createIndependent([bool $persist = false ]) : array<string|int, mixed>
    Parameters
- $persist : bool = false
- 
                    Persist the revision in database 
Return values
array<string|int, mixed> —'revision' and 'hash'
getCookieConsentManagement()
Getter.
    public
                    getCookieConsentManagement() : mixed
    Tags
getEnsuredCurrentHash()
Get the current active revision. If there is not current revision (only after activating the plugin itself), the current revision hash gets calculated from current settings.
    public
                    getEnsuredCurrentHash() : string
    Return values
stringgetPersistence()
Getter.
    public
                    getPersistence() : mixed
    Tags
nonVisualBlockersToJson()
All non-visual content blockers as they should require a new consent.
    public
                    nonVisualBlockersToJson() : array<string|int, array<string|int, mixed>>
    Return values
array<string|int, array<string|int, mixed>>optionsToJson()
Get settings as array object so it can be used within e.g. JSON or serialize to the frontend.
    public
                    optionsToJson([string $type = self::TYPE_ALL ]) : mixed
    Parameters
- $type : string = self::TYPE_ALL
- 
                    See TYPE_constants
prepareJsonForFrontend()
Prepare a revision JSON for frontend.
    public
                    prepareJsonForFrontend(array<string|int, mixed> $revision) : mixed
    Parameters
- $revision : array<string|int, mixed>
serviceGroupsToJson()
All service groups as JSON representation.
    public
                    serviceGroupsToJson() : array<string|int, array<string|int, mixed>>
    Return values
array<string|int, array<string|int, mixed>>tcfMetadataToJson()
TCF metadata to array.
    public
                    tcfMetadataToJson() : mixed
    tcfToJson()
TCF data (vendors, declarations, stacks, ...) to array.
    public
                    tcfToJson([string $type = self::TYPE_ALL ]) : mixed
    TCF Policy 2025-01-16.5.0.a, Chapter IV, point 21(8) defines (without annotations):
- If a Vendor that was not included in a prior use of the Framework UI is added by the Publisher, the Publisher must resurface or instruct its CMP to resurface the Framework UI to establish that Vendor’s Legal Bases before signalling that the Vendor’s Legal Bases have been established. It also means resurfacing the UI, for example, when a previously surfaced Vendor claims a previously undisclosed Purpose or changes its declared Legal Basis for a previously disclosed Purpose before signalling that the Vendor’s Legal Bases have been established.
This means, we must according to the TCF policy resurface the cookie banner if:
- An new vendor configuration is created
- A legal basis of an of a purpose existing vendor configuration has been changed
- A new purpose has been added by a vendor
From a legal point of view, all information according to Art. 13 GDPR are relevant for a informed consent, which includes more information from the vendor definition as required by TCF (e.g. privacy policy link or contact information of the vendor).
Suggested solution: All data of the vendor except of the device disclosure (controlled by the vendor's server, but not IAB Europe) trigger a resurface. This should be a balance between legal compliance, fulfilling the IAB Europe requirements and user-friendliness.
Parameters
- $type : string = self::TYPE_ALL
- 
                    See TYPE_constants
Tags
websiteOperatorToJson()
Operator as own object as it is needed in this format for `@devowl-wp/react-cookie-banner`.
    public
                    websiteOperatorToJson() : mixed