Completed
Push — develop ( 613db1...73b4e9 )
by Daniel
05:02
created

assets   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 29
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscribedEvents() 0 6 1
A set_swiper_assets() 0 12 1
1
<?php
2
/**
3
 *
4
 * @package sitemaker
5
 * @copyright (c) 2018 Daniel A. (blitze)
6
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
 *
8
 */
9
10
namespace blitze\content\event;
11
12
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
13
14
class assets implements EventSubscriberInterface
15
{
16
	/**
17
	 * @return array
18
	 */
19
	public static function getSubscribedEvents()
20
	{
21
		return array(
22
			'blitze.sitemaker.admin_bar.set_assets' => 'set_swiper_assets',
23
		);
24
	}
25
26
	/**
27
	 * @param \phpbb\event\data $event
28
	 * @return void
29
	 */
30
	public function set_swiper_assets(\phpbb\event\data $event)
31
	{
32
		$event['assets'] = array_merge_recursive($event['assets'], array(
33
			'js'   => array(
34
				'@blitze_content/vendor/swiper/dist/js/swiper.min.js',
35
				'@blitze_content/assets/blocks/swiper.min.js',
36
			),
37
			'css'   => array(
38
				'@blitze_content/assets/blocks/swiper.min.css',
39
			)
40
		));
41
	}
42
}
43