original_string: public static function getBacklink($url, ServerRequest $request)
      {
          if (!isset($url['plugin'])) {
              $url['plugin'] = $request->getParam('plugin');
          }
          if (!isset($url['controller'])) {
              $url['controller'] = $request->getParam('controller');
          }
  
          $path = join('.', [
              'FILTER_' . ($url['plugin'] ? $url['plugin'] : ''),
              $url['controller'],
              $url['action']
          ]);
  
          if (($filterOptions = $request->getSession()->read($path))) {
              if (isset($filterOptions['slug'])) {
                  $url['sluggedFilter'] = $filterOptions['slug'];
                  unset($filterOptions['slug']);
              }
              if (!empty($filterOptions)) {
                  if (!isset($url['?'])) {
                      $url['?'] = [];
                  }
                  $url['?'] = array_merge($url['?'], $filterOptions);
              }
          }
  
          return $url;
      }
code: public static function getBacklink($url, ServerRequest $request)
      {
          if (!isset($url['plugin'])) {
              $url['plugin'] = $request->getParam('plugin');
          }
          if (!isset($url['controller'])) {
              $url['controller'] = $request->getParam('controller');
          }
  
          $path = join('.', [
              'FILTER_' . ($url['plugin'] ? $url['plugin'] : ''),
              $url['controller'],
              $url['action']
          ]);
  
          if (($filterOptions = $request->getSession()->read($path))) {
              if (isset($filterOptions['slug'])) {
                  $url['sluggedFilter'] = $filterOptions['slug'];
                  unset($filterOptions['slug']);
              }
              if (!empty($filterOptions)) {
                  if (!isset($url['?'])) {
                      $url['?'] = [];
                  }
                  $url['?'] = array_merge($url['?'], $filterOptions);
              }
          }
  
          return $url;
      }
code_tokens: public static function getBacklink ( $ url , ServerRequest $ request ) { if ( ! isset ( $ url [ 'plugin' ] ) ) { $ url [ 'plugin' ] = $ request -> getParam ( 'plugin' ) ; } if ( ! isset ( $ url [ 'controller' ] ) ) { $ url [ 'controller' ] = $ request -> getParam ( 'controller' ) ; } $ path = join ( '.' , [ 'FILTER_' . ( $ url [ 'plugin' ] ? $ url [ 'plugin' ] : '' ) , $ url [ 'controller' ] , $ url [ 'action' ] ] ) ; if ( ( $ filterOptions = $ request -> getSession ( ) -> read ( $ path ) ) ) { if ( isset ( $ filterOptions [ 'slug' ] ) ) { $ url [ 'sluggedFilter' ] = $ filterOptions [ 'slug' ] ; unset ( $ filterOptions [ 'slug' ] ) ; } if ( ! empty ( $ filterOptions ) ) { if ( ! isset ( $ url [ '?' ] ) ) { $ url [ '?' ] = [ ] ; } $ url [ '?' ] = array_merge ( $ url [ '?' ] , $ filterOptions ) ; } } return $ url ; }
docstring: Try to retrieve a filtered backlink from the session.
  
  @param array $url
  @param ServerRequest $request
  @return array
docstring_tokens: Try to retrieve a filtered backlink from the session .