Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Annotations.php « Annotations « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1b0503862a9d6d4c3b0ca92f033c96277e3537e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
 * Piwik - Open source web analytics
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 *
 * @category Piwik_Plugins
 * @package Piwik_Annotations
 */

/**
 * Annotations plugins. Provides the ability to attach text notes to
 * dates for each sites. Notes can be viewed, modified, deleted or starred.
 * 
 * @package Piwik_Annotations
 */
class Piwik_Annotations extends Piwik_Plugin
{
	/**
	 * Returns information about this plugin.
	 * 
	 * @return array
	 */
	public function getInformation()
	{
		return array(
			'description' => Piwik_Translate('Annotations_PluginDescription'),
			'author' => 'Piwik',
			'author_homepage' => 'http://piwik.org/',
			'version' => Piwik_Version::VERSION,
		);
	}
	
	/**
	 * Returns list of event hooks.
	 * 
	 * @return array
	 */
	public function getListHooksRegistered()
	{
		return array(
			'AssetManager.getCssFiles' => 'getCssFiles',
			'AssetManager.getJsFiles' => 'getJsFiles'
		);
	}

	/**
	 * Adds css files for this plugin to the list in the event notification.
	 * 
	 * @param Piwik_Event_Notification $notification  notification object
	 */
	function getCssFiles( $notification )
	{
		$cssFiles = &$notification->getNotificationObject();
		$cssFiles[] = "plugins/Annotations/templates/styles.css";
	}

	/**
	 * Adds js files for this plugin to the list in the event notification.
	 * 
	 * @param Piwik_Event_Notification $notification  notification object
	 */
	function getJsFiles( $notification )
	{
		$jsFiles = &$notification->getNotificationObject();
		$jsFiles[] = "plugins/Annotations/templates/annotations.js";
	}
}