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

assets::getSubscribedEvents()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 2
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