Passed
Push — master ( 29d82b...e3431b )
by Sugeng
01:59
created

DropifyAsset::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 11
rs 10
1
<?php
2
3
namespace diecoding\dropify\assets;
4
5
use Yii;
6
use yii\web\AssetBundle;
7
use yii\web\YiiAsset;
8
9
/**
10
 * DropifyAsset represents a collection of asset files, such as CSS, JS, images.
11
 * 
12
 * @link [sugeng-sulistiyawan.github.io](sugeng-sulistiyawan.github.io)
13
 * @author Sugeng Sulistiyawan <[email protected]>
14
 * @copyright Copyright (c) 2023
15
 */
16
class DropifyAsset extends AssetBundle
17
{
18
    /**
19
     * @inheritdoc
20
     */
21
    public $sourcePath = '@bower/dropify/dist';
22
23
    /**
24
     * @inheritdoc
25
     */
26
    public $css = [
27
        'css/dropify.min.css',
28
    ];
29
30
    /**
31
     * @inheritdoc
32
     */
33
    public $js = [
34
        'js/dropify.min.js',
35
    ];
36
37
    /**
38
     * @inheritdoc
39
     */
40
    public $depends = [
41
        YiiAsset::class,
42
    ];
43
44
    /**
45
     * @inheritdoc
46
     */
47
    public function init()
48
    {
49
        parent::init();
50
51
        $css = <<< CSS
52
.dropify-wrapper .dropify-message p {
53
    font-size: 14px;
54
}
55
CSS;
56
57
        Yii::$app->view->registerCss($css);
58
    }
59
}
60