This repository was archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitchcraftPlugin.php
More file actions
65 lines (53 loc) · 1.45 KB
/
SwitchcraftPlugin.php
File metadata and controls
65 lines (53 loc) · 1.45 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
<?php
/**
* Switchcraft
* A Craft CMS Twig Extension for easier and human readable loop switcher
*
* @author Paper Tiger <info@papertiger.com>
* @copyright Copyright (c) 2016, Paper Tiger, Inc.
* @see http://papertiger.com
*/
namespace Craft;
class SwitchcraftPlugin extends BasePlugin
{
protected $name = 'Switchcraft';
protected $version = '1.0.0';
protected $developer = 'Paper Tiger';
protected $developerUrl = 'http://papertiger.com';
protected $pluginUrl = 'https://github.com/papertiger/Switchcraft';
protected $docUrl = $this->getPluginUrl() . '/blob/master/README.md';
protected $relUrl = 'https://raw.githubusercontent.com/papertiger/Switchcraft/master/changelog.json';
public function getName()
{
return $this->name;
}
public function getVersion()
{
return $this->version;
}
public function getDeveloper()
{
return $this->developer;
}
public function getDeveloperUrl()
{
return $this->developerUrl;
}
public function getPluginUrl()
{
return $this->pluginUrl;
}
public function getDocumentationUrl()
{
return $this->docUrl;
}
public function getReleaseFeedUrl()
{
return $this->relUrl;
}
public function addTwigExtension()
{
Craft::import( 'plugins.switchcraft.twigextensions.SwitchcraftTwigExtension' );
return new SwitchcraftTwigExtension();
}
}