Cake\Controller\Controller::beforeRedirect PHP Метод

beforeRedirect() публичный Метод

If the event is stopped the controller will not continue on to redirect the request. The $url and $status variables have same meaning as for the controller's method. You can set the event result to response instance or modify the redirect location using controller's response instance.
public beforeRedirect ( Cake\Event\Event $event, string | array $url, Response $response ) : Response | null
$event Cake\Event\Event An Event instance
$url string | array A string or array-based URL pointing to another location within the app, or an absolute URL
$response Cake\Network\Response The response object.
Результат Cake\Network\Response | null
    public function beforeRedirect(Event $event, $url, Response $response)
    {
        return null;
    }