本文整理汇总了PHP中EditPage::importContentFormData方法的典型用法代码示例。如果您正苦于以下问题:PHP EditPage::importContentFormData方法的具体用法?PHP EditPage::importContentFormData怎么用?PHP EditPage::importContentFormData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EditPage
的用法示例。
在下文中一共展示了EditPage::importContentFormData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: importContentFormData
protected function importContentFormData(&$request)
{
$format = $request->getVal('format', CollaborationListContentHandler::FORMAT_WIKI);
if ($format !== CollaborationListContentHandler::FORMAT_WIKI) {
return parent::importContentFormData($request);
}
$desc = trim($request->getText('wpCollabDescTextbox'));
if ($desc === null) {
// Only 1 textbox?
return parent::importContentFormData($request);
}
$main = trim($request->getText('wpTextbox1', ''));
$options = $request->getText('wpCollaborationKitOptions', '');
return $desc . CollaborationListContent::HUMAN_DESC_SPLIT . $options . CollaborationListContent::HUMAN_DESC_SPLIT . $main;
}
开发者ID:wikimedia,项目名称:mediawiki-extensions-CollaborationKit,代码行数:15,代码来源:CollaborationListContentEditor.php
示例2: importContentFormData
/**
* Converts input from the editing form into the text/x-collabkit
* serialization used for processing the edit.
* @param &$request WebRequest
* @return string|null
*/
protected function importContentFormData(&$request)
{
$format = $request->getVal('format', CollaborationListContentHandler::FORMAT_WIKI);
if ($format !== CollaborationListContentHandler::FORMAT_WIKI) {
return parent::importContentFormData($request);
}
$displayname = trim($request->getText('wpCollabHubDisplayName'));
if ($displayname === null) {
// Only 1 textbox?
return parent::importContentFormData($request);
}
$introduction = trim($request->getText('wpCollabHubIntroduction', ''));
$footer = trim($request->getText('wpCollabHubFooter', ''));
$image = trim($request->getText('wpCollabHubImage', ''));
$colour = trim($request->getText('wpCollabHubColour', ''));
$content = trim($request->getText('wpCollabHubContent', ''));
return $displayname . CollaborationHubContent::HUMAN_DESC_SPLIT . $introduction . CollaborationHubContent::HUMAN_DESC_SPLIT . $footer . CollaborationHubContent::HUMAN_DESC_SPLIT . $image . CollaborationHubContent::HUMAN_DESC_SPLIT . $colour . CollaborationHubContent::HUMAN_DESC_SPLIT . $content;
}
开发者ID:wikimedia,项目名称:mediawiki-extensions-CollaborationKit,代码行数:24,代码来源:CollaborationHubContentEditor.php
示例3: importContentFormData
function importContentFormData($request)
{
if ($request->wasPosted() && !$request->getVal('wpTextbox1')) {
$whow = WikihowArticleEditor::newFromRequest($request);
$whow->mIsNew = false;
$this->whow = $whow;
$content = $this->whow->formatWikiText();
return $content;
} else {
return parent::importContentFormData($request);
}
}