本文整理汇总了PHP中XenForo_Link::buildBasicLink方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Link::buildBasicLink方法的具体用法?PHP XenForo_Link::buildBasicLink怎么用?PHP XenForo_Link::buildBasicLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XenForo_Link
的用法示例。
在下文中一共展示了XenForo_Link::buildBasicLink方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildLink
/**
* @see XenForo_Route_BuilderInterface::buildLink()
* @param $originalPrefix
* @param $outputPrefix
* @param $action
* @param $extension
* @param $data
* @param array $extraParams
* @return string
*/
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
$link = parent::buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, $extraParams);
if (!$link instanceof XenForo_Link) {
return $link;
}
return XenForo_Link::buildBasicLink('forum', $action, $extension) . strval($link);
}
示例2: 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);
}
}
示例3: buildLink
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
if (is_array($data)) {
return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $data, 'client_id');
} else {
return XenForo_Link::buildBasicLink($outputPrefix, $action, $extension);
}
}
示例4: buildLink
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
if ($action == 'tagged' and isset($data['entity_id'])) {
// this is our link
$newAction = $action . '/' . str_replace(',', '/', $data['entity_id']);
return XenForo_Link::buildBasicLink($outputPrefix, $newAction, $extension);
}
return parent::buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, $extraParams);
}
示例5: buildBasicLink
public static function buildBasicLink($prefix, $action, $extension)
{
if (self::$_setup11x) {
switch ($prefix) {
case 'widget-page-index':
$prefix = 'index';
break;
case 'index':
$prefix = 'forums';
break;
}
}
return XenForo_Link::buildBasicLink($prefix, $action, $extension);
}
示例6: buildLink
/**
* @see XenForo_Route_BuilderInterface::buildLink()
* @param $originalPrefix
* @param $outputPrefix
* @param $action
* @param $extension
* @param $data
* @param array $extraParams
* @return bool|string
*/
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
$customIndex = XenForo_Application::get('customIndex');
$buildIndexLink = true;
if ($action === '' || $action === 'index') {
if ($data && $customIndex->params) {
foreach ($customIndex->params as $param => $value) {
if (!isset($data[$param]) || $data[$param] !== $value) {
$buildIndexLink = false;
break;
}
}
}
if ($buildIndexLink) {
return XenForo_Link::buildBasicLink('index', $action, $extension);
}
}
if (method_exists(get_parent_class($this), 'buildLink')) {
return parent::buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, $extraParams);
}
return false;
}
示例7: buildLink
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
if (!empty($data)) {
if (!is_array($data)) {
$data = array('tag_text' => $data);
}
if (!empty($data['tag_text'])) {
if (Tinhte_XenTag_Option::get('linkFormat') == Tinhte_XenTag_Option::LINK_FORMAT_BEAUTIFUL) {
// try to use the beautiful format
if (self::_isSafeText($data['tag_text'])) {
$encodedData = array('tag_text' => urlencode($data['tag_text']));
$action = XenForo_Link::getPageNumberAsAction($action, $extraParams);
return XenForo_Link::buildBasicLinkWithStringParam($outputPrefix, $action, $extension, $encodedData, 'tag_text');
}
}
// use the ugly format
$extraParams[Tinhte_XenTag_Constants::URI_PARAM_TAG_TEXT] = $data['tag_text'];
return XenForo_Link::buildBasicLink($outputPrefix, $action, $extension);
}
}
return XenForo_Link::buildBasicLink($outputPrefix, $action, $extension);
}
示例8: buildLink
/**
* @see XenForo_Route_BuilderInterface::buildLink()
* @param $originalPrefix
* @param $outputPrefix
* @param $action
* @param $extension
* @param $data
* @param array $extraParams
* @return string
*/
public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
{
return XenForo_Link::buildBasicLink('forum', $action, $extension);
}
示例9: getSessionActivityDetailsForList
public static function getSessionActivityDetailsForList(array $activities)
{
if (XenForo_Visitor::getInstance()->hasPermission('modm_ajaxchat', 'ajax_chat_view')) {
foreach ($activities as $key => $activity) {
switch ($activity['controller_action']) {
case "Online":
$output[$key] = array(new XenForo_Phrase('modm_ajaxchat_viewing_online_list'), new XenForo_Phrase('modm_ajaxchat_tabname'), XenForo_Link::buildBasicLink('chat', 'online'), false);
break;
case "Logs":
case "ChatLogs":
$output[$key] = new XenForo_Phrase('performing_moderation_duties');
break;
default:
$output[$key] = array(new XenForo_Phrase('modm_ajaxchat_browsing'), new XenForo_Phrase('modm_ajaxchat_tabname'), XenForo_Link::buildBasicLink('chat', 'login'), false);
break;
}
}
return $output;
}
}