Completed
Push — master ( fd05c5...39e38d )
by Alexey
02:30
created

PngFixAsset::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
eloc 5
nc 1
nop 0
cc 1
1
<?php
2
3
namespace common\assets;
4
5
use yii\web\AssetBundle;
6
use yii\web\View;
7
8
/**
9
 * Class PngFixAsset
10
 * @package common\assets
11
 */
12
class PngFixAsset extends AssetBundle
13
{
14
    /**
15
     * @var string
16
     */
17
    public $sourcePath;
18
19
    /**
20
     * @var array
21
     */
22
    public $js = [];
23
24
    public function init()
25
    {
26
        parent::init();
27
        $this->sourcePath = __DIR__ . '/src/pngfix';
28
        $this->js = [
29
            'jquery.ifixpng.js',
30
            'script.js'
31
        ];
32
    }
33
34
    /**
35
     * @var array
36
     */
37
    public $jsOptions = [
38
        'condition' => 'lt IE 7',
39
        'position' => View::POS_HEAD,
40
    ];
41
}
42