public function redirectUrl()
    {
        $redirectUrl = $this->getView()->getRequest()->getQuery('_redirect_url');
        $redirectUrlViewVar = $this->getViewVar('_redirect_url');

        if (!empty($redirectUrlViewVar)) {
            $redirectUrl = $redirectUrlViewVar;
        } else {
            $context = $this->Form->context();
            if ($context->val('_redirect_url')) {
                $redirectUrl = $context->val('_redirect_url');
            }
        }

        if (empty($redirectUrl)) {
            return null;
        }

        return $this->Form->hidden('_redirect_url', [
            'name' => '_redirect_url',
            'value' => $redirectUrl,
            'id' => null,
            'secure' => FormHelper::SECURE_SKIP
        ]);
    }
public function redirectUrl()
    {
        $redirectUrl = $this->getView()->getRequest()->getQuery('_redirect_url');
        $redirectUrlViewVar = $this->getViewVar('_redirect_url');

        if (!empty($redirectUrlViewVar)) {
            $redirectUrl = $redirectUrlViewVar;
        } else {
            $context = $this->Form->context();
            if ($context->val('_redirect_url')) {
                $redirectUrl = $context->val('_redirect_url');
            }
        }

        if (empty($redirectUrl)) {
            return null;
        }

        return $this->Form->hidden('_redirect_url', [
            'name' => '_redirect_url',
            'value' => $redirectUrl,
            'id' => null,
            'secure' => FormHelper::SECURE_SKIP
        ]);
    }
public function redirectUrl ( ) { $ redirectUrl = $ this -> getView ( ) -> getRequest ( ) -> getQuery ( '_redirect_url' ) ; $ redirectUrlViewVar = $ this -> getViewVar ( '_redirect_url' ) ; if ( ! empty ( $ redirectUrlViewVar ) ) { $ redirectUrl = $ redirectUrlViewVar ; } else { $ context = $ this -> Form -> context ( ) ; if ( $ context -> val ( '_redirect_url' ) ) { $ redirectUrl = $ context -> val ( '_redirect_url' ) ; } } if ( empty ( $ redirectUrl ) ) { return null ; } return $ this -> Form -> hidden ( '_redirect_url' , [ 'name' => '_redirect_url' , 'value' => $ redirectUrl , 'id' => null , 'secure' => FormHelper :: SECURE_SKIP ] ) ; }
Returns a hidden input for the redirect_url if it exists
in the request querystring, view variables, form data

@return string|null
Returns a hidden input for the redirect_url if it exists in the request querystring view variables form data