DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Developer Manual

TypoScript condition

A TypoScript condition to check cookie status.

[TYPO3Liebhaber\CookieDataPrivacy\TypoScript\Conditions\CookieStatusCondition]
    cookie status is deny.
[global]

Utility

To get status of cookie in your controller/PHP file (status: allow or deny)

use TYPO3Liebhaber\CookieDataPrivacy\Utility\CookieDataPrivacyUtility; // put this line before your controler start

$status = CookieDataPrivacyUtility::getStatus();

ViewHelpers

To get status of cookie in your fluid template (status: allow or deny)

{namespace cp=TYPO3Liebhaber\CookieDataPrivacy\ViewHelpers}

<cp:cookieDataPrivacy /> or inline {cp:cookieDataPrivacy()}

To get mandatory checkboxes for forms/newsletter/registration form etc. May multiple forms has different text, so add your text in locallang.xlf with different translateKey.

{namespace cp=TYPO3Liebhaber\CookieDataPrivacy\ViewHelpers}

<f:format.raw><cp:formPrivacy translateKey="data_privacy_contact_form" /></f:format.raw>

Frontend

Revoke button

<button id="cookie-btn-open" class="btn btn-primary">Revoke</button>