Skip to content

Instantly share code, notes, and snippets.

@rvsjoen
Created July 4, 2012 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rvsjoen/3049903 to your computer and use it in GitHub Desktop.
Save rvsjoen/3049903 to your computer and use it in GitHub Desktop.
class ... extends JControllerForm
{
public function save($key = null, $urlVar = null)
{
$result = parent::save($key, $urlVar);
$model = $this->getModel();
$state = $model->getState();
if($result){
$link = JRoute::_($this->getRedirectToItem().'&id='.$state->get('item.id'), false);
$this->setRedirect($link);
}
var_dump($state);
var_dump($this->redirect);
die;
return $result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment