-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathFormerlyPlugin.php
44 lines (38 loc) · 1.31 KB
/
FormerlyPlugin.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
<?php
namespace Craft;
class FormerlyPlugin extends BasePlugin
{
public function getName()
{
return 'Formerly';
}
public function getVersion()
{
return '1.5.2';
}
public function getDeveloper()
{
return 'XO Digital';
}
public function getDeveloperUrl()
{
return 'http://www.xodigital.com.au';
}
public function hasCpSection()
{
return true;
}
public function registerCpRoutes()
{
return array(
'formerly/forms' => array('action' => 'formerly/forms/index'),
'formerly/forms/new' => array('action' => 'formerly/forms/editForm'),
'formerly/forms/(?P<formId>\d+)' => array('action' => 'formerly/forms/editForm'),
'formerly' => array('action' => 'formerly/submissions/index'),
'formerly/(?P<formHandle>{handle})/(?P<submissionId>\d+)' => array('action' => 'formerly/submissions/viewSubmission'),
'formerly/(?P<formHandle>{handle})/file/(?P<fileId>\d+)' => array('action' => 'formerly/submissions/viewUpload'),
'formerly/export' => array('action' => 'formerly/export/index'),
'formerly/export/csv' => array('action' => 'formerly/export/csv')
);
}
}