| Current File : /home/jvzmxxx/wiki1/extensions/Flow/includes/Api/ApiFlowEditPost.php |
<?php
namespace Flow\Api;
use ApiBase;
class ApiFlowEditPost extends ApiFlowBasePost {
public function __construct( $api ) {
parent::__construct( $api, 'edit-post', 'ep' );
}
protected function getAction() {
return 'edit-post';
}
protected function getBlockParams() {
return array( 'topic' => $this->extractRequestParams() );
}
public function getAllowedParams() {
return array(
'postId' => array(
ApiBase::PARAM_REQUIRED => true,
),
'prev_revision' => array(
ApiBase::PARAM_REQUIRED => true,
),
'content' => array(
ApiBase::PARAM_REQUIRED => true,
),
'format' => array(
ApiBase::PARAM_REQUIRED => true,
ApiBase::PARAM_DFLT => 'wikitext',
ApiBase::PARAM_TYPE => array( 'html', 'wikitext' ),
),
) + parent::getAllowedParams();
}
/**
* @see ApiBase::getExamplesMessages()
*/
protected function getExamplesMessages() {
return array(
'action=flow&submodule=edit-post&page=Topic:S2tycnas4hcucw8w&eppostId=???&epprev_revision=???&epcontent=Nice%20to&20meet%20you&epformat=wikitext'
=> 'apihelp-flow+edit-post-example-1',
);
}
}