当前位置: 首页>>代码示例>>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;未经允许,请勿转载。