当前位置: 首页>>代码示例>>PHP>>正文


PHP EditPage::showContentForm方法代码示例

本文整理汇总了PHP中EditPage::showContentForm方法的典型用法代码示例。如果您正苦于以下问题:PHP EditPage::showContentForm方法的具体用法?PHP EditPage::showContentForm怎么用?PHP EditPage::showContentForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EditPage的用法示例。


在下文中一共展示了EditPage::showContentForm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showContentForm

 /**
  * Renders and adds the editing form to the parser output.
  */
 protected function showContentForm()
 {
     if ($this->contentFormat !== CollaborationHubContentHandler::FORMAT_WIKI) {
         return parent::showContentForm();
     }
     $parts = explode(CollaborationHubContent::HUMAN_DESC_SPLIT, $this->textbox1, 6);
     if (count($parts) !== 6) {
         return parent::showContentForm();
     }
     $out = RequestContext::getMain()->getOutput();
     $pageLang = $this->getTitle()->getPageLanguage();
     $formFields = $this->getFormFields($parts);
     $htmlForm = new OOUI\FieldsetLayout(['items' => $formFields]);
     $out->enableOOUI();
     $out->addHtml($htmlForm);
 }
开发者ID:wikimedia,项目名称:mediawiki-extensions-CollaborationKit,代码行数:19,代码来源:CollaborationHubContentEditor.php

示例2: showContentForm

 protected function showContentForm()
 {
     if ($this->contentFormat !== CollaborationListContentHandler::FORMAT_WIKI) {
         return parent::showContentForm();
     }
     $parts = explode(CollaborationListContent::HUMAN_DESC_SPLIT, $this->textbox1, 3);
     if (count($parts) !== 3) {
         return parent::showContentForm();
     }
     $pageLang = $this->getTitle()->getPageLanguage();
     $attribs = ['id' => 'wpCollabDescTextbox', 'lang' => $pageLang->getHtmlCode(), 'dir' => $pageLang->getDir()];
     $descTitle = wfMessage('collaborationkit-listedit-description')->text();
     $listTitle = wfMessage('collaborationkit-listedit-list')->text();
     $out = RequestContext::getMain()->getOutput();
     $out->addHtml(Html::element('h2', ["id" => 'mw-collabkit-desc'], $descTitle) . Html::textarea('wpCollabDescTextbox', $parts[0], $attribs) . Html::element('h2', ["id" => 'mw-collabkit-list'], $listTitle));
     $out->addHtml(Html::Hidden('wpCollaborationKitOptions', $parts[1]));
     $this->showTextbox1(null, trim($parts[2]));
 }
开发者ID:wikimedia,项目名称:mediawiki-extensions-CollaborationKit,代码行数:18,代码来源:CollaborationListContentEditor.php

示例3: showContentForm

 function showContentForm()
 {
     global $wgOut;
     # Should be redundant, but check just in case
     if ($this->diff || wfReadOnly()) {
         $this->noVisualEditor = true;
     }
     # Also apply htmlspecialchars? See $encodedtext
     $html_text = $this->safeUnicodeOutput($this->textbox1);
     if (!($this->noVisualEditor || $this->userWantsTraditionalEditor)) {
         $this->noVisualEditor = self::wiki2html($this->mArticle, $wgUser, &$this, &$html_text);
     }
     if (!$this->noVisualEditor && !$this->userWantsTraditionalEditor) {
         # TODO: Now that MediaWiki has showContentForm, there is no need for a separate hook
         $this->noVisualEditor = self::showBox(&$this, $html_text, $rows, $cols, $ew);
     }
     if (!$this->noVisualEditor && !$this->userWantsTraditionalEditor) {
         $wgOut->addHTML("<input type='hidden' value=\"0\" name=\"wpNoVisualEditor\" />\n");
     } else {
         $wgOut->addHTML("<input type='hidden' value=\"1\" name=\"wpNoVisualEditor\" />\n");
         parent::showContentForm();
     }
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:23,代码来源:MeanEditorEditPage.body.php


注:本文中的EditPage::showContentForm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。