src/Admin/Model/DoctrineRestServiceModel.php
/**
     * Merge the content negotiation configuration for the given controller
     * service into the REST metadata
     *
     * @param string $controllerServiceName
     * @param DoctrineRestServiceEntity $metadata
     * @param array $config
     */
Merge the content negotiation configuration for the given controller
service into the REST metadata


Merge the content negotiation configuration for the given controller service into the REST metadata
protected function mergeContentNegotiationConfig(
        $controllerServiceName,
        DoctrineRestServiceEntity $metadata,
        array $config
    ) {
        if (! isset($config['zf-content-negotiation'])) {
            return;
        }
        $config = $config['zf-content-negotiation'];
        if (isset($config['controllers'][$controllerServiceName])) {
            $metadata->exchangeArray([
                'selector' => $config['controllers'][$controllerServiceName],
            ]);
        }
        if (isset($config['accept_whitelist'][$controllerServiceName])) {
            $metadata->exchangeArray([
                'accept_whitelist' => $config['accept_whitelist'][$controllerServiceName],
            ]);
        }
        if (isset($config['content_type_whitelist'][$controllerServiceName])) {
            $metadata->exchangeArray([
                'content_type_whitelist' => $config['content_type_whitelist'][$controllerServiceName],
            ]);
        }
    }
protected function mergeContentNegotiationConfig ( $ controllerServiceName , DoctrineRestServiceEntity $ metadata , array $ config ) { if ( ! isset ( $ config [ 'zf-content-negotiation' ] ) ) { return ; } $ config = $ config [ 'zf-content-negotiation' ] ; if ( isset ( $ config [ 'controllers' ] [ $ controllerServiceName ] ) ) { $ metadata -> exchangeArray ( [ 'selector' => $ config [ 'controllers' ] [ $ controllerServiceName ] , ] ) ; } if ( isset ( $ config [ 'accept_whitelist' ] [ $ controllerServiceName ] ) ) { $ metadata -> exchangeArray ( [ 'accept_whitelist' => $ config [ 'accept_whitelist' ] [ $ controllerServiceName ] , ] ) ; } if ( isset ( $ config [ 'content_type_whitelist' ] [ $ controllerServiceName ] ) ) { $ metadata -> exchangeArray ( [ 'content_type_whitelist' => $ config [ 'content_type_whitelist' ] [ $ controllerServiceName ] , ] ) ; } }
Merge the content negotiation configuration for the given controller
 service into the REST metadata
Merge the content negotiation configuration for the given controller service into the REST metadata