original_string: 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];
      }
code: 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];
      }
code_tokens: 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 ] ; }
docstring: 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
docstring_tokens: Internal method that returns a redirect URL from the config based on supplied context . Otherwise the default redirect is used .