/** * Method to add an element. * * @access public * @return void */ public function add() { CkJSession::checkToken() or CkJSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN')); $this->_result = $result = parent::add(); $model = $this->getModel(); //Define the redirections switch ($this->getLayout() . '.' . $this->getTask()) { case 'changelogs.add': $this->applyRedirection($result, array('stay', 'com_rtiprint.changelog.changelog'), array()); break; default: $this->applyRedirection($result, array('stay', 'com_rtiprint.changelog.rochangelog')); break; } }