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


PHP SFUtils::createFormLink方法代码示例

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


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

示例1: formlink

 /**
  * @param Parser $parser
  * @return mixed
  */
 public static function formlink($parser)
 {
     $params = func_get_args();
     array_shift($params);
     // We don't need the parser.
     $original = SFUtils::createFormLink($parser, $params, 'formlink');
     if (strpos($original, 'class="new"') !== false) {
         $original = str_replace('class="new"', 'class="btn btn-primary pull-right"', $original);
     } else {
         $original = str_replace('href=', 'class="btn btn-primary pull-right" href=', $original);
     }
     $original = str_replace('self">', 'self"><i class="fa fa-edit"></i> ', $original);
     return $parser->insertStripItem($original);
 }
开发者ID:vedmaka,项目名称:SettleInSkin,代码行数:18,代码来源:stools.class.php

示例2: renderSeriesLink

 /**
  * Renders the #serieslink parser function.
  * 
  * @param Parser $parser
  * @return string the unique tag which must be inserted into the stripped text 
  */
 public static function renderSeriesLink(&$parser)
 {
     global $wgTitle;
     $params = func_get_args();
     array_shift($params);
     // We don't need the parser.
     // remove the target parameter should it be present
     foreach ($params as $key => $value) {
         $elements = explode('=', $value, 2);
         if ($elements[0] === 'target') {
             unset($params[$key]);
         }
     }
     // set the origin parameter
     // This will block it from use as iterator parameter. Oh well.
     $params[] = "origin=" . $parser->getTitle()->getArticleId();
     // hack to remove newline from beginning of output, thanks to
     // http://jimbojw.com/wiki/index.php?title=Raw_HTML_Output_from_a_MediaWiki_Parser_Function
     return $parser->insertStripItem(SFUtils::createFormLink($parser, 'SeriesEdit', $params), $parser->mStripState);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:26,代码来源:SPSUtils.php

示例3: renderQueryFormLink

 static function renderQueryFormLink(&$parser)
 {
     $params = func_get_args();
     array_shift($params);
     // We don't need the parser.
     // hack to remove newline from beginning of output, thanks to
     // http://jimbojw.com/wiki/index.php?title=Raw_HTML_Output_from_a_MediaWiki_Parser_Function
     return $parser->insertStripItem(SFUtils::createFormLink($parser, $params, 'queryformlink'), $parser->mStripState);
 }
开发者ID:Rikuforever,项目名称:wiki,代码行数:9,代码来源:SF_ParserFunctions.php

示例4: renderQueryFormLink

 static function renderQueryFormLink(&$parser)
 {
     $params = func_get_args();
     array_shift($params);
     // We don't need the parser.
     // If it's a popup, make this just a static display of
     // results, with no 'additiona query' form, since at the
     // moment additional queries can't be handled anyway.
     if (in_array('popup', $params)) {
         $params[] = 'wpRunQuery=true';
         $params[] = 'additionalquery=false';
     }
     // hack to remove newline from beginning of output, thanks to
     // http://jimbojw.com/wiki/index.php?title=Raw_HTML_Output_from_a_MediaWiki_Parser_Function
     return $parser->insertStripItem(SFUtils::createFormLink($parser, 'RunQuery', $params), $parser->mStripState);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:16,代码来源:SF_ParserFunctions.php


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