-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReplicatePage.api.php
More file actions
43 lines (35 loc) · 879 Bytes
/
ReplicatePage.api.php
File metadata and controls
43 lines (35 loc) · 879 Bytes
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
<?php
class ApiReplicatePage extends ApiBase {
public function execute() {
$params = $this->extractRequestParams();
$status = ReplicatePage::executeReplicate( $params['source'], $params['target'] );
$this->getResult()->addValue( null, $this->getModuleName(), array ( 'status' => $status ) );
return true;
}
public function getAllowedParams() {
return array(
'source' => array(
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true
),
'target' => array(
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true
)
);
}
public function getDescription() {
return array(
'API for triggering page replication'
);
}
public function getParamDescription() {
return array(
'source' => 'Source Page',
'target' => 'Target Page'
);
}
public function getVersion() {
return __CLASS__ . ': 1.1';
}
}