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


PHP HTMLForm::getContext方法代碼示例

本文整理匯總了PHP中HTMLForm::getContext方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTMLForm::getContext方法的具體用法?PHP HTMLForm::getContext怎麽用?PHP HTMLForm::getContext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HTMLForm的用法示例。


在下文中一共展示了HTMLForm::getContext方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: showDiff

 public static function showDiff($data, HTMLForm $form)
 {
     $rev1 = self::revOrTitle($data['Revision1'], $data['Page1']);
     $rev2 = self::revOrTitle($data['Revision2'], $data['Page2']);
     if ($rev1 && $rev2) {
         $de = new DifferenceEngine($form->getContext(), $rev1, $rev2, null, $data['Action'] == 'purge', $data['Unhide'] == '1');
         $de->showDiffPage(true);
     }
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:9,代碼來源:SpecialComparePages.php

示例2: showDiff

 public static function showDiff($data, HTMLForm $form)
 {
     $rev1 = self::revOrTitle($data['Revision1'], $data['Page1']);
     $rev2 = self::revOrTitle($data['Revision2'], $data['Page2']);
     if ($rev1 && $rev2) {
         $revision = Revision::newFromId($rev1);
         if ($revision) {
             // NOTE: $rev1 was already checked, should exist.
             $contentHandler = $revision->getContentHandler();
             $de = $contentHandler->createDifferenceEngine($form->getContext(), $rev1, $rev2, null, $data['Action'] == 'purge', $data['Unhide'] == '1');
             $de->showDiffPage(true);
         }
     }
 }
開發者ID:MediaWiki-stable,項目名稱:1.26.1,代碼行數:14,代碼來源:SpecialComparePages.php

示例3: uiSubmit

 /**
  * Submit callback for an HTMLForm object, will simply call submit().
  *
  * @since 1.20
  * @param array $data
  * @param HTMLForm $form
  * @return Status|string|bool
  */
 public static function uiSubmit(array $data, HTMLForm $form)
 {
     return self::submit($data, $form->getContext());
 }
開發者ID:paladox,項目名稱:2,代碼行數:12,代碼來源:SpecialEmailuser.php

示例4: processUIUnblock

 /**
  * Submit callback for an HTMLForm object
  * @param array $data
  * @param HTMLForm $form
  * @return Array( Array(message key, parameters)
  */
 public static function processUIUnblock(array $data, HTMLForm $form)
 {
     return self::processUnblock($data, $form->getContext());
 }
開發者ID:biribogos,項目名稱:wikihow-src,代碼行數:10,代碼來源:SpecialUnblock.php

示例5: processTagForm

 public function processTagForm(array $data, HTMLForm $form)
 {
     $context = $form->getContext();
     $out = $context->getOutput();
     $tag = $data['HiddenTag'];
     $status = call_user_func(['ChangeTags', "{$form->tagAction}TagWithChecks"], $tag, $data['Reason'], $context->getUser(), true);
     if ($status->isGood()) {
         $out->redirect($this->getPageTitle()->getLocalURL());
         return true;
     } elseif ($status->isOK() && $form->tagAction === 'delete') {
         // deletion succeeded, but hooks raised a warning
         $out->addWikiText($this->msg('tags-delete-warnings-after-delete', $tag, count($status->getWarningsArray()))->text() . "\n" . $status->getWikitext());
         $out->addReturnTo($this->getPageTitle());
         return true;
     } else {
         $out->addWikiText("<div class=\"error\">\n" . $status->getWikitext() . "\n</div>");
         return false;
     }
 }
開發者ID:claudinec,項目名稱:galan-wiki,代碼行數:19,代碼來源:SpecialTags.php

示例6: onSubmit

 /**
  * Process the form on POST submission.
  * @param array $data
  * @param HTMLForm $form
  * @return bool|array True for success, false for didn't-try, array of errors on failure
  */
 public function onSubmit(array $data, HTMLForm $form = null)
 {
     return self::processForm($data, $form->getContext());
 }
開發者ID:kolzchut,項目名稱:mediawiki-molsa-new,代碼行數:10,代碼來源:SpecialBlock.php


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