src/Traits/RedirectTrait.php
protected function _redirect(Subject $subject, $url = null, $status = null)
    {
        $url = $this->_redirectUrl($url);

        $subject->url = $url;
        $subject->status = $status;
        $event = $this->_trigger('beforeRedirect', $subject);

        if ($event->isStopped()) {
            return $this->_controller()->response;
        }

        return $this->_controller()->redirect($subject->url, $subject->status);
    }
protected function _redirect(Subject $subject, $url = null, $status = null)
    {
        $url = $this->_redirectUrl($url);

        $subject->url = $url;
        $subject->status = $status;
        $event = $this->_trigger('beforeRedirect', $subject);

        if ($event->isStopped()) {
            return $this->_controller()->response;
        }

        return $this->_controller()->redirect($subject->url, $subject->status);
    }
protected function _redirect ( Subject $ subject , $ url = null , $ status = null ) { $ url = $ this -> _redirectUrl ( $ url ) ; $ subject -> url = $ url ; $ subject -> status = $ status ; $ event = $ this -> _trigger ( 'beforeRedirect' , $ subject ) ; if ( $ event -> isStopped ( ) ) { return $ this -> _controller ( ) -> response ; } return $ this -> _controller ( ) -> redirect ( $ subject -> url , $ subject -> status ) ; }
Called for all redirects inside CRUD

@param \Crud\Event\Subject $subject Event subject
@param string|array|null $url URL
@param int|null $status Status code
@return \Cake\Http\Response
Called for all redirects inside CRUD