本文整理汇总了PHP中JEV_CommonFunctions::jEventsDoLink方法的典型用法代码示例。如果您正苦于以下问题:PHP JEV_CommonFunctions::jEventsDoLink方法的具体用法?PHP JEV_CommonFunctions::jEventsDoLink怎么用?PHP JEV_CommonFunctions::jEventsDoLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JEV_CommonFunctions
的用法示例。
在下文中一共展示了JEV_CommonFunctions::jEventsDoLink方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jEventsLinkCloaking
/**
* Cloaks html link whith javascript
*
* @param string $url The cloaking URL
* @param string $text The link text
* @param array $attribs additional attributes
* @return string HTML
*/
function jEventsLinkCloaking($url = '', $text = '', $attribs = array())
{
static $linkCloaking;
if (!isset($linkCloaking)) {
$cfg =& JEVConfig::getInstance();
$linkCloaking = $cfg->get('com_linkcloaking', 0);
}
if (!is_array($attribs)) {
$attribs = array();
}
if ($linkCloaking) {
$cloakattribs = array('onclick' => '"window.location.href=\'' . JRoute::_($url) . '\';return false;"');
return JEV_CommonFunctions::jEventsDoLink("", $text, array_merge($cloakattribs, $attribs));
} else {
return JEV_CommonFunctions::jEventsDoLink(JRoute::_($url), "{$text}", $attribs);
}
}