本文整理汇总了PHP中JoomleagueHelperRoute::buildQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomleagueHelperRoute::buildQuery方法的具体用法?PHP JoomleagueHelperRoute::buildQuery怎么用?PHP JoomleagueHelperRoute::buildQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JoomleagueHelperRoute
的用法示例。
在下文中一共展示了JoomleagueHelperRoute::buildQuery方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIcalRoute
public static function getIcalRoute($projectid, $teamid = null, $pgid = null)
{
$params = array("option" => "com_joomleague", "view" => "ical", "p" => $projectid);
if (!is_null($pgid)) {
$params["pgid"] = $pgid;
}
if (!is_null($teamid)) {
$params["teamid"] = $teamid;
}
$query = JoomleagueHelperRoute::buildQuery($params);
$link = JRoute::_("index.php?" . $query, false);
return $link;
}
示例2: addtipp
function addtipp()
{
JRequest::checkToken() or jexit(JText::_('JL_PRED_ENTRY_INVALID_TOKEN_PREDICTIONS_NOT_SAVED'));
$option = JRequest::getCmd('option');
$optiontext = strtoupper(JRequest::getCmd('option') . '_');
$mainframe = JFactory::getApplication();
$document = JFactory::getDocument();
$msg = '';
$link = '';
$predictionGameID = JRequest::getVar('prediction_id', '', 'post', 'int');
$joomlaUserID = JRequest::getVar('user_id', '', 'post', 'int');
$memberID = JRequest::getVar('memberID', '', 'post', 'int');
$round_id = JRequest::getVar('round_id', '', 'post', 'int');
$pjID = JRequest::getVar('pjID', '', 'post', 'int');
$set_r = JRequest::getVar('set_r', '', 'post', 'int');
$set_pj = JRequest::getVar('set_pj', '', 'post', 'int');
$model = $this->getModel('predictionentry');
$user =& JFactory::getUser();
$isMember = $model->checkPredictionMembership();
$allowedAdmin = $model->getAllowed();
if ($user->id != $joomlaUserID && !$allowedAdmin) {
$msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_ERROR_1');
$link = JFactory::getURI()->toString();
} else {
if (!$isMember && !$allowedAdmin) {
$msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_ERROR_2');
$link = JFactory::getURI()->toString();
} else {
if ($pjID != $set_pj) {
$params = array('option' => 'com_joomleague', 'view' => 'predictionentry', 'prediction_id' => $predictionGameID, 'pj' => $set_pj);
$query = JoomleagueHelperRoute::buildQuery($params);
$link = JRoute::_('index.php?' . $query, false);
$this->setRedirect($link);
}
if ($round_id != $set_r) {
$params = array('option' => 'com_joomleague', 'view' => 'predictionentry', 'prediction_id' => $predictionGameID, 'r' => $set_r, 'pj' => $pjID);
$query = JoomleagueHelperRoute::buildQuery($params);
$link = JRoute::_('index.php?' . $query, false);
$this->setRedirect($link);
}
if (!$model->savePredictions($allowedAdmin)) {
$msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_ERROR_3');
$link = JFactory::getURI()->toString();
} else {
$msg .= JText::_('COM_JOOMLEAGUE_PRED_ENTRY_CONTROLLER_MSG_1');
$link = JFactory::getURI()->toString();
}
}
}
//echo '<br />' . $link . '<br />';
//echo '<br />' . $msg . '<br />';
$this->setRedirect($link, $msg);
}