private function resolveRequest(Request $request = null)
    {
        if (null === $request) {
            return $this->get('request_stack')->getCurrentRequest();
        }

        return $request;
    }
private function resolveRequest(Request $request = null)
    {
        if (null === $request) {
            return $this->get('request_stack')->getCurrentRequest();
        }

        return $request;
    }
private function resolveRequest ( Request $ request = null ) { if ( null === $ request ) { return $ this -> get ( 'request_stack' ) -> getCurrentRequest ( ) ; } return $ request ; }
To keep backwards compatibility with older Sonata News code.

@internal

@param Request $request

@return Request
To keep backwards compatibility with older Sonata News code .