Taitava\EUCookieLawPopup\EUCookieLawPopup
Class EUCookieLawPopup
An extension for SiteTree.
Synopsis
class EUCookieLawPopup
extends Extension
{
- // members
- private static boolean $enabled = true;
- private static boolean $use_jquery_from_framework = true;
- private static string $popup_element_jquery_selector = '.eupopup';
- private static boolean $cookie_policy_page_id = false;
- private static array $options = ;
- // methods
- public void contentcontrollerInit()
- public static void RequireLibraries()
- public static void RequireDeleteAllCookiesJavaScriptMethod()
- public static void InitializePopup()
- private static array unprepared_javascript_options()
- private static void prepare_javascript_options()
- public static void getCookiePolicyLink()
Hierarchy
Extends
- SilverStripe\Core\Extension
Uses
- SilverStripe\Core\Config\Configurable
Members
private
-
$enabled
If true, 'EU cookie law popup' related CSS and JavaScript files are automatically defined as requirements during each page request. -
$options
Options that will be passed to the JavaScript library. See vendor/taitava/eucookielawpopup/_config/eucookielawpopup.yml to see all available option variables and their default values. -
$popup_element_jquery_selector
You must have an HTML element matching this jQuery selector located somewhere in your HTML code. For example: -
$use_jquery_from_framework
If true, adds jquery from SS framework as a requirement automatically. Requires $enabled config value to be true too, otherwise does nothing.
Methods
private
public
- InitializePopup()
- RequireDeleteAllCookiesJavaScriptMethod() — The window.deleteAllCookies() method is not necessarily needed by the actual cookie consent popup notification, so it's not included by default.
- RequireLibraries()
- contentcontrollerInit()
- getCookiePolicyLink()