本文整理匯總了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();
}
}