protected function getRedirectUrl($context = null)
    {
        $redirectContext = explode('-', $context, 2)[0];
        $redirectSource = ends_with($context, '-close') ? 'redirectClose' : 'redirect';

        // Get the redirect for the provided context
        $redirects = [$context => $this->getConfig("{$redirectContext}[{$redirectSource}]", '')];

        // Assign the default redirect afterwards to prevent the
        // source for the default redirect being default[redirect]
        $redirects['default'] = $this->getConfig('defaultRedirect', '');

        if (empty($redirects[$context])) {
            return $redirects['default'];
        }

        return $redirects[$context];
    }
protected function getRedirectUrl($context = null)
    {
        $redirectContext = explode('-', $context, 2)[0];
        $redirectSource = ends_with($context, '-close') ? 'redirectClose' : 'redirect';

        // Get the redirect for the provided context
        $redirects = [$context => $this->getConfig("{$redirectContext}[{$redirectSource}]", '')];

        // Assign the default redirect afterwards to prevent the
        // source for the default redirect being default[redirect]
        $redirects['default'] = $this->getConfig('defaultRedirect', '');

        if (empty($redirects[$context])) {
            return $redirects['default'];
        }

        return $redirects[$context];
    }
protected function getRedirectUrl ( $ context = null ) { $ redirectContext = explode ( '-' , $ context , 2 ) [ 0 ] ; $ redirectSource = ends_with ( $ context , '-close' ) ? 'redirectClose' : 'redirect' ; // Get the redirect for the provided context $ redirects = [ $ context => $ this -> getConfig ( "{$redirectContext}[{$redirectSource}]" , '' ) ] ; // Assign the default redirect afterwards to prevent the // source for the default redirect being default[redirect] $ redirects [ 'default' ] = $ this -> getConfig ( 'defaultRedirect' , '' ) ; if ( empty ( $ redirects [ $ context ] ) ) { return $ redirects [ 'default' ] ; } return $ redirects [ $ context ] ; }
Internal method that returns a redirect URL from the config based on
supplied context. Otherwise the default redirect is used.

@param string $context Redirect context, eg: create, update, delete.
@return string
Internal method that returns a redirect URL from the config based on supplied context . Otherwise the default redirect is used .