-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCraftGmapsPlugin.php
More file actions
92 lines (82 loc) · 1.88 KB
/
Copy pathCraftGmapsPlugin.php
File metadata and controls
92 lines (82 loc) · 1.88 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
namespace Craft;
class CraftGmapsPlugin extends BasePlugin
{
/**
* Get Plugin Name to display in admin
*
* @return String
*/
public function getName()
{
return Craft::t('Google Maps Field Type');
}
/**
* Plugins can have descriptions of themselves displayed on the Plugins page by adding a getDescription() method
* on the primary plugin class:
*
* @return mixed
*/
public function getDescription()
{
return Craft::t('A simple Google Maps field type for CraftCMS');
}
/**
* Plugins can have links to their documentation on the Plugins page by adding a getDocumentationUrl() method on
* the primary plugin class:
*
* @return string
*/
public function getDocumentationUrl()
{
return 'https://github.com/40Digits/craftgmaps';
}
/**
* Icon in admin plugin area
*/
public function getIconPath()
{
return craft()->path->getPluginsPath() . '/icon.svg';
}
/**
* Get version number
*
* Be sure to update this when you have a new migration
*
* @return String
*/
public function getVersion()
{
return '0.0.3';
}
/**
* Get developer name to display in admin
*
* @return String
*/
public function getDeveloper()
{
return 'David Hahn';
}
/**
* Get developer url to display in admin
*
* @return String
*/
public function getDeveloperUrl()
{
return '40digits.com';
}
protected function defineSettings()
{
return array(
'googleMapsApiKey' => array(AttributeType::String),
);
}
public function getSettingsHtml()
{
return craft()->templates->render('craftgmaps/settings', array(
'settings' => $this->getSettings()
));
}
}