PHP code example of isq-portal / yii2-cookiecheck

1. Go to this page and download the library: Download isq-portal/yii2-cookiecheck library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

isq-portal / yii2-cookiecheck example snippets


# add to composer.json
"i2-cookiecheck": "@dev"
	}

# temporary dev local path (../) solution:
"repositories": [
		...,
		{
			"type": "path",
			"url": "../yii2-cookiecheck"
		}
	],

# composer update

# import class to view
use IsqPortal\Yii2Cookiecheck\ISQCookiecheck;

# integrate widget to view with options., e.g.:
<? echo ISQCookiecheck::widget(['options' => [
                    'cookiePolicyURL' => 'site/privacy',
                    'panelTogglePosition' => 'left',
                    'unsetDefault' => 'blocked',
                    'Matomo' => [
                        'enabled' => '1',
                        'label' => 'Webanalyse (Matomo)',
                        'code' => ''
                    ]
                ]
            ]);