-
Notifications
You must be signed in to change notification settings - Fork 1
/
CookieBossAsset.php
65 lines (57 loc) · 1.78 KB
/
CookieBossAsset.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Craft Cookie boss plugin for Craft CMS 3.x
*
* Allow your visitors to set there cookie preference.
*
* @link www.dutchheight.com
* @copyright Copyright (c) 2019 Dutch Height
*/
namespace dutchheight\cookieboss\assetbundles\cookieBoss;
use Craft;
use craft\web\AssetBundle;
use craft\web\assets\cp\CpAsset;
/**
* CookieBossAsset AssetBundle
*
* AssetBundle represents a collection of asset files, such as CSS, JS, images.
*
* Each asset bundle has a unique name that globally identifies it among all asset bundles used in an application.
* The name is the [fully qualified class name](http://php.net/manual/en/language.namespaces.rules.php)
* of the class representing it.
*
* An asset bundle can depend on other asset bundles. When registering an asset bundle
* with a view, all its dependent asset bundles will be automatically registered.
*
* http://www.yiiframework.com/doc-2.0/guide-structure-assets.html
*
* @author Dutch Height
* @package CookieBoss
* @since 1.0.0
*/
class CookieBossAsset extends AssetBundle
{
// Public Methods
// =========================================================================
/**
* Initializes the bundle.
*/
public function init()
{
// define the path that your publishable resources live
$this->sourcePath = "@dutchheight/cookieboss/assetbundles/cookieboss/dist";
// define the dependencies
// $this->depends = [
// CpAsset::class,
// ];
// define the relative path to CSS/JS files that should be registered with the page
// when this asset bundle is registered
$this->js = [
'js/CookieBoss.js',
];
$this->css = [
'css/CookieBoss.css',
];
parent::init();
}
}