code/libraries/joomlatools/component/koowa/controller/behavior/editable.php
protected function _actionSave2new(KControllerContextInterface $context)
    {
        // Cache and lock the referrer since _ActionSave would unset it
        $referrer = $this->getReferrer($context);
        $this->_lockReferrer($context);

        $entity = $this->save($context);

        // Re-set the referrer
        $cookie = $this->getObject('lib:http.cookie', array(
            'name'   => $this->_cookie_name,
            'value'  => (string) $referrer,
            'path'   => $this->_cookie_path
        ));

        $context->response->headers->addCookie($cookie);

        $identifier = $this->getMixer()->getIdentifier();
        $view       = KStringInflector::singularize($identifier->name);
        $url        = sprintf('index.php?option=com_%s&view=%s', $identifier->package, $view);

        $context->response->setRedirect($this->getObject('lib:http.url',array('url' => $url)));

        return $entity;
    }
protected function _actionSave2new(KControllerContextInterface $context)
    {
        // Cache and lock the referrer since _ActionSave would unset it
        $referrer = $this->getReferrer($context);
        $this->_lockReferrer($context);

        $entity = $this->save($context);

        // Re-set the referrer
        $cookie = $this->getObject('lib:http.cookie', array(
            'name'   => $this->_cookie_name,
            'value'  => (string) $referrer,
            'path'   => $this->_cookie_path
        ));

        $context->response->headers->addCookie($cookie);

        $identifier = $this->getMixer()->getIdentifier();
        $view       = KStringInflector::singularize($identifier->name);
        $url        = sprintf('index.php?option=com_%s&view=%s', $identifier->package, $view);

        $context->response->setRedirect($this->getObject('lib:http.url',array('url' => $url)));

        return $entity;
    }
protected function _actionSave2new ( KControllerContextInterface $ context ) { // Cache and lock the referrer since _ActionSave would unset it $ referrer = $ this -> getReferrer ( $ context ) ; $ this -> _lockReferrer ( $ context ) ; $ entity = $ this -> save ( $ context ) ; // Re-set the referrer $ cookie = $ this -> getObject ( 'lib:http.cookie' , array ( 'name' => $ this -> _cookie_name , 'value' => ( string ) $ referrer , 'path' => $ this -> _cookie_path ) ) ; $ context -> response -> headers -> addCookie ( $ cookie ) ; $ identifier = $ this -> getMixer ( ) -> getIdentifier ( ) ; $ view = KStringInflector :: singularize ( $ identifier -> name ) ; $ url = sprintf ( 'index.php?option=com_%s&view=%s' , $ identifier -> package , $ view ) ; $ context -> response -> setRedirect ( $ this -> getObject ( 'lib:http.url' , array ( 'url' => $ url ) ) ) ; return $ entity ; }
Saves the current row and redirects to a new edit form

@param KControllerContextInterface $context
@return KModelEntityInterface
Saves the current row and redirects to a new edit form