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


PHP XenForo_Link::buildBasicLinkWithIntegerParam方法代码示例

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


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

示例1: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (!empty($data['temp_hash']) && empty($data['content_id'])) {
         $extraParams['temp_hash'] = $data['temp_hash'];
     }
     return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'attachment_id', 'filename');
 }
开发者ID:hahuunguyen,项目名称:DTUI_201105,代码行数:13,代码来源:Attachments.php

示例2: buildLink

 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     $actions = explode('/', $action);
     switch ($actions[0]) {
         case 'top-owned-games':
             $intParams = 'owned_id';
             $strParams = '';
             break;
         case 'top-played-games':
             $intParams = 'played_id';
             $strParams = '';
             break;
         case 'top-recently-played-games':
             $intParams = 'recent_id';
             $strParams = '';
             break;
         default:
             $intParams = '';
             $strParams = '';
             break;
     }
     $action = XenForo_Link::getPageNumberAsAction($action, $extraParams);
     if ($intParams) {
         return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, $intParams, $strParams);
     } else {
         return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $data, $strParams);
     }
 }
开发者ID:WENKz,项目名称:Steam-Authentication-for-XenForo,代码行数:28,代码来源:Steam.php

示例3: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (preg_match('#^auto/(.*)$#i', $action, $match)) {
         return XenForo_Link::buildBasicLinkWithIntegerParam("{$outputPrefix}/auto", $match[1], $extension, $data, 'auto_warning_id');
     }
     return parent::buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, $extraParams);
 }
开发者ID:ThemeHouse-XF,项目名称:AutoWarning,代码行数:13,代码来源:Warnings.php

示例4: buildLink

 /**
  * @param $originalPrefix
  * @param $outputPrefix
  * @param $action
  * @param $extension
  * @param $data
  * @param array $extraParams
  * @return false|string
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     $parts = explode('/', $action, 2);
     $subComponentName = strtolower($parts[0]);
     if ($subComponentName === 'photos') {
         if (isset($data['photo_id']) && !isset($data['content_id'])) {
             $data['content_id'] = $data['photo_id'];
         }
         if (isset($data['title']) && $data['title'] == $data['content_id']) {
             $data['title'] = '';
         }
     }
     if ($subComponentName === 'videos') {
         if (isset($data['title']) && $data['title'] == $data['content_id']) {
             $data['title'] = '';
         }
     }
     if ($subComponentName === 'locations' && isset($data['location_url'])) {
         $data['location_url'] = sonnb_XenGallery_Model_Gallery::getTitleForUrl($data['location_url']);
     }
     if ($subComponentName === 'cameras' && isset($data['camera_url'])) {
         $data['camera_url'] = sonnb_XenGallery_Model_Gallery::getTitleForUrl($data['camera_url']);
     }
     $link = XenForo_Link::buildSubComponentLink($this->_subComponents, $outputPrefix, $action, $extension, $data);
     if (!$link) {
         $link = XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, '');
     }
     return $link;
 }
开发者ID:Sywooch,项目名称:forums,代码行数:38,代码来源:XenGallery.php

示例5: buildLink

 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     $components = explode('/', $action);
     $subPrefix = strtolower(array_shift($components));
     $intParams = '';
     $strParams = '';
     $title = '';
     $slice = false;
     switch ($subPrefix) {
         case 'special':
             $subPrefix = strtolower(array_shift($components));
             if ($subPrefix == 'edit-template' || $subPrefix == 'delete-template') {
                 $outputPrefix .= '/special';
                 $strParams = 'template_name';
             }
             $slice = true;
             break;
         case 'archive':
             $intParams = 'history_id';
             $slice = true;
             break;
         default:
             $strParams = 'page_slug';
     }
     if ($slice) {
         $outputPrefix .= '/' . $subPrefix;
         $action = implode('/', $components);
     }
     $action = XenForo_Link::getPageNumberAsAction($action, $extraParams);
     if ($strParams) {
         return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $data, $strParams);
     } else {
         return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, $intParams, $title);
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:35,代码来源:Wiki.php

示例6: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (is_numeric($data)) {
         $data = array('field_attachment_id' => $data);
     }
     return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'field_attachment_id');
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:13,代码来源:CustomFieldContent.php

示例7: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (!empty($data['ip_id'])) {
         $extraParams['ip_id'] = $data['ip_id'];
     }
     return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'user_id', 'username');
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:13,代码来源:SpamCleaner.php

示例8: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (preg_match('#^action/(.*)$#i', $action, $match)) {
         return XenForo_Link::buildBasicLinkWithIntegerParam("{$outputPrefix}/action", $match[1], $extension, $data, 'warning_action_id');
     } else {
         return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'warning_definition_id', 'title');
     }
 }
开发者ID:namgiangle90,项目名称:tokyobaito,代码行数:14,代码来源:Warnings.php

示例9: buildLink

 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (is_array($data)) {
         return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'subscription_id');
     } else {
         return XenForo_Link::buildBasicLink($outputPrefix, $action, $extension);
     }
 }
开发者ID:billyprice1,项目名称:bdApi,代码行数:8,代码来源:Subscription.php

示例10: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     // for situations such as an array with thread and node info
     if (isset($data['node_title'])) {
         $data['title'] = $data['node_title'];
     }
     return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'node_id', 'title');
 }
开发者ID:Sywooch,项目名称:forums,代码行数:14,代码来源:LinkForums.php

示例11: buildLink

 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (is_null($this->_getKey())) {
         return null;
         //return XenForo_Link::buildLink($action); // TODO: test this?
     }
     return \XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, $this->_getKey(), $this->_title);
 }
开发者ID:robclancy,项目名称:xf-support,代码行数:8,代码来源:RoutePrefix.php

示例12: buildLink

 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if ($action === self::PREFIX_COMMENTS and isset($extraParams[self::PARAM_COMMENT_ID])) {
         $action .= sprintf('/%d', $extraParams[self::PARAM_COMMENT_ID]);
         unset($extraParams[self::PARAM_COMMENT_ID]);
     }
     return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'profile_post_id');
 }
开发者ID:billyprice1,项目名称:bdApi,代码行数:8,代码来源:ProfilePosts.php

示例13: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (isset($extraParams['page'])) {
         if (strval($extraParams['page']) !== XenForo_Application::$integerSentinel && $extraParams['page'] <= 1) {
             unset($extraParams['page']);
         }
     }
     return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'user_id', 'username');
 }
开发者ID:Sywooch,项目名称:forums,代码行数:15,代码来源:Members.php

示例14: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     if (is_array($data) && !empty($data['url_portion'])) {
         return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $data, 'url_portion');
     } else {
         if (isset($data['social_forum_title'])) {
             $data['title'] = $data['social_forum_title'];
         }
         return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'social_forum_id', 'title');
     }
 }
开发者ID:AndroidOS,项目名称:SocialGroups,代码行数:17,代码来源:SocialForums.php

示例15: buildLink

 /**
  * Method to build a link to the specified page/action with the provided
  * data and params.
  *
  * @see XenForo_Route_BuilderInterface
  */
 public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
 {
     /* @var $classModel ThemeHouse_Objects_Model_Class */
     $classModel = XenForo_Model::create('ThemeHouse_Objects_Model_Class');
     $classes = $classModel->getAllClasses();
     $classId = str_replace("-", "_", $originalPrefix);
     if (array_key_exists($classId, $classes)) {
         return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, $classId . '_id', 'title');
     }
     return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'object_id', 'title');
 }
开发者ID:ThemeHouse-XF,项目名称:Objects,代码行数:17,代码来源:Objects.php


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