Passed
Push — master ( 758032...380927 )
by Benjamin
28:34 queued 21:24
created

EcommerceWidgetAsset::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 0
dl 0
loc 22
rs 9.2
c 0
b 0
f 0
1
<?php
2
/**
3
 * @link      https://dukt.net/craft/analytics/
4
 * @copyright Copyright (c) 2018, Dukt
5
 * @license   https://dukt.net/craft/analytics/docs/license
6
 */
7
8
namespace dukt\analytics\web\assets\ecommercewidget;
9
10
use craft\web\AssetBundle;
11
use craft\web\assets\cp\CpAsset;
12
use dukt\analytics\web\assets\analytics\AnalyticsAsset;
13
14
/**
15
 * Realtime report widget asset bundle.
16
 */
17
class EcommerceWidgetAsset extends AssetBundle
18
{
19
    // Public Methods
20
    // =========================================================================
21
22
    /**
23
     * @inheritdoc
24
     */
25
    public function init()
26
    {
27
        // define the path that your publishable resources live
28
        $this->sourcePath = __DIR__.'/dist';
29
30
        // define the dependencies
31
        $this->depends = [
32
            CpAsset::class,
33
            AnalyticsAsset::class,
34
        ];
35
36
        // define the relative path to CSS/JS files that should be registered with the page
37
        // when this asset bundle is registered
38
        $this->js = [
39
            'EcommerceWidget.js',
40
        ];
41
42
        $this->css = [
43
            'EcommerceWidget.css',
44
        ];
45
46
        parent::init();
47
    }
48
}