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;
    }