protected function getControllerParameters(Request $request, array $parameters): array
    {
        $result = [$request];

        foreach ($parameters as $key => $value) {
            if (strpos($key, '_') !== 0) {
                $result[$key] = $value;
            }
        }

        return $result;
    }
protected function getControllerParameters(Request $request, array $parameters): array
    {
        $result = [$request];

        foreach ($parameters as $key => $value) {
            if (strpos($key, '_') !== 0) {
                $result[$key] = $value;
            }
        }

        return $result;
    }
protected function getControllerParameters ( Request $ request , array $ parameters ) : array { $ result = [ $ request ] ; foreach ( $ parameters as $ key => $ value ) { if ( strpos ( $ key , '_' ) !== 0 ) { $ result [ $ key ] = $ value ; } } return $ result ; }
Returns arguments for controller callback.

@param Request $request
@param array $parameters
@return array
Returns arguments for controller callback .