Completed
Pull Request — master (#36)
by resu
12:13
created

LeafLetAsset

Complexity

Total Complexity 0

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
lcom 0
cbo 1
dl 0
loc 12
ccs 3
cts 3
cp 1
c 1
b 0
f 0
1
<?php
2
/**
3
 * @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
4
 * @link http://2amigos.us
5
 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
6
 */
7
namespace dosamigos\leaflet;
8
9
use yii\web\AssetBundle;
10
11
/**
12
 * LeafLetAsset Registers widget requires files. Please, use the following in order to override bundles for CDN:
13
 *
14
 * ```
15
 *  return [
16
 *        // ...
17
 *        'components' => [
18
 *            'bundles' => [
19
 *                'dosamigos\leaftlet\LeafLetAsset' => [
20
 *                    'sourcePath' => null,
21
 *                    'js' => [ 'http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js' ],
22
 *                    'css' => [ 'http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css' ]
23
 *                ]
24
 *            ]
25
 *        ]
26
 *    ]
27
 * ```
28
 *
29
 * @author Antonio Ramirez <[email protected]>
30
 * @link http://www.ramirezcobos.com/
31
 * @link http://www.2amigos.us/
32
 * @package dosamigos\leaflet
33
 */
34
class LeafLetAsset extends AssetBundle
35
{
36
    public $sourcePath = '@bower/leaflet/dist';
37
38
    public $css = [
39
        'leaflet.css'
40
    ];
41
42 15
    public $js = [
43
        'leaflet-src.js'
44
    ];
45
}