This repository was archived by the owner on Oct 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrestapi2.php
More file actions
60 lines (53 loc) · 1.73 KB
/
restapi2.php
File metadata and controls
60 lines (53 loc) · 1.73 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
<?php
/**
* Plugin that implements a REST API
*
* Documentation: http://resources.phplist.com/plugin/restapi
*
* version history:
*
* v 2 * phpList Api Team https://github.com/orgs/phpList/teams/api
* - renamed plugin repository to phplist-plugin-restapi
* - https://github.com/phpList/phplist-plugin-restapi
*
* v 1 * Andreas Ek, 2012-12-26
* https://github.com/EkAndreas/phplistapi
*/
defined( 'PHPLISTINIT' ) || die;
class restapi extends phplistPlugin {
// Set plugin name presented in admin pages
public $name = 'RESTAPI';
// Description of the app as displayed in admin pages
public $description = 'Implements a REST API interface to phpList';
function restapi() {
parent::phplistplugin();
// Set path to plugin folder
$this->coderoot = dirname( __FILE__ ) . '/restapi/';
}
// Set header nav link label, url, and category
public $topMenuLinks = array(
// Array key determines both label of admin menu item, & php file name
// of page
'main' => array( 'category' => 'system' ),
);
// Set dashboard link label and url
function adminmenu() {
return array(
// Array key determines link URL in dashboard; value sets link label
'main' => 'RESTAPI'
);
}
// Add settings to admin interface
// Note: stock text, ready for editing / customisation
// public $settings = array(
// "myplugin_setting1" => array (
// 'value' => "some default",
// 'description' => 'Description of this setting',
// 'type' => "text",
// 'allowempty' => 0,
// "max" => 1000,
// "min" => 0,
// 'category'=> 'general',
// ),
// );
}