SearchWidgetAsset::init()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 22
rs 9.9666
1
<?php
2
/**
3
 * @link      https://dukt.net/twitter/
4
 * @copyright Copyright (c) Dukt
5
 * @license   https://github.com/dukt/twitter/blob/master/LICENSE.md
6
 */
7
8
namespace dukt\twitter\web\assets\searchwidget;
9
10
use craft\web\AssetBundle;
11
use craft\web\assets\cp\CpAsset;
12
use dukt\twitter\web\assets\twitter\TwitterAsset;
13
14
/**
15
 * Class TwitterAsset
16
 *
17
 * @author Dukt <[email protected]>
18
 * @since  3.0
19
 */
20
class SearchWidgetAsset extends AssetBundle
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
            TwitterAsset::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
            'SearchWidget.js',
40
        ];
41
42
        $this->css = [
43
            'widget.css',
44
        ];
45
46
        parent::init();
47
    }
48
}