protected function getRequestAttributeName(Request $request, ParamConverter $configuration)
    {
        $param = parent::getRequestAttributeName($request, $configuration);
        if (!$request->attributes->has($param)) {
            if ($request->attributes->has('dataId')) {
                $param = 'dataId';
            } elseif ($request->attributes->has('id')) {
                $param = 'id';
            }
        }

        return $param;
    }
protected function getRequestAttributeName(Request $request, ParamConverter $configuration)
    {
        $param = parent::getRequestAttributeName($request, $configuration);
        if (!$request->attributes->has($param)) {
            if ($request->attributes->has('dataId')) {
                $param = 'dataId';
            } elseif ($request->attributes->has('id')) {
                $param = 'id';
            }
        }

        return $param;
    }
protected function getRequestAttributeName ( Request $ request , ParamConverter $ configuration ) { $ param = parent :: getRequestAttributeName ( $ request , $ configuration ) ; if ( ! $ request -> attributes -> has ( $ param ) ) { if ( $ request -> attributes -> has ( 'dataId' ) ) { $ param = 'dataId' ; } elseif ( $ request -> attributes -> has ( 'id' ) ) { $ param = 'id' ; } } return $ param ; }
Allow fallback to "dataId" or "id" in case no attribute is found

@deprecated This custom behavior will be deprecated in futur versions

@param Request        $request
@param ParamConverter $configuration

@return string
Allow fallback to dataId or id in case no attribute is found