-
Notifications
You must be signed in to change notification settings - Fork 3
/
TruncatePlugin.php
45 lines (36 loc) · 919 Bytes
/
TruncatePlugin.php
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
<?php
namespace Craft;
class TruncatePlugin extends BasePlugin
{
/* --------------------------------------------------------------
* PLUGIN INFO
* ------------------------------------------------------------ */
public function getName()
{
return Craft::t('Truncate');
}
public function getVersion()
{
return '0.1';
}
public function getDeveloper()
{
return 'Chris Ruzin';
}
public function getDeveloperUrl()
{
return 'http://chrisruzin.net';
}
/* --------------------------------------------------------------
* HOOKS
* ------------------------------------------------------------ */
/**
* Load the TruncateTwigExtension class from our ./twigextensions
* directory and return the extension into the template layer
*/
public function addTwigExtension()
{
Craft::import('plugins.truncate.twigextensions.TruncateTwigExtension');
return new TruncateTwigExtension();
}
}