當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EditPage::importContentFormData方法代碼示例

本文整理匯總了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);
     }
 }
開發者ID:biribogos,項目名稱:wikihow-src,代碼行數:12,代碼來源:EditPageWrapper.class.php


注:本文中的EditPage::importContentFormData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。