本文整理汇总了PHP中JoomleagueHelperRoute::getEditEventsRouteNew方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomleagueHelperRoute::getEditEventsRouteNew方法的具体用法?PHP JoomleagueHelperRoute::getEditEventsRouteNew怎么用?PHP JoomleagueHelperRoute::getEditEventsRouteNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JoomleagueHelperRoute
的用法示例。
在下文中一共展示了JoomleagueHelperRoute::getEditEventsRouteNew方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
function save()
{
JRequest::checkToken() or jexit(JText::_('COM_JOOMLEAGUE_GLOBAL_INVALID_TOKEN'));
$msg = '';
$link = '';
$post = JRequest::get('post');
$project_id = JRequest::getInt('p', 0);
$match_id = JRequest::getInt('mid', 0);
$changes = JRequest::getInt('changes_check', 0);
$model = $this->getModel('editevents');
$user = JFactory::getUser();
$post['playerpositions'] = $model->getProjectPositions(0, 1);
$post['staffpositions'] = $model->getProjectPositions(0, 2);
$post['refereepositions'] = $model->getProjectPositions(0, 3);
if ($changes && ($model->isAllowed() || $model->isMatchAdmin($match_id, $user->id))) {
if ($model->saveMatchStartingLineUps($post)) {
$msg .= JText::_('Changes on selected match were saved');
} else {
$msg .= JText::_('Error while saving changes on selected match');
}
} else {
$msg .= JText::_('Found any changes or you are no match admin. So nothing is saved!');
}
$link = JoomleagueHelperRoute::getEditEventsRouteNew($project_id, $match_id);
//echo '<br />'; echo $link; echo '<br />'; echo $msg; echo '<br />'; die();
$this->setRedirect($link, $msg);
}