src/Admin/Model/DoctrineRestServiceModel.php
/**
     * Update the content negotiation configuration for the service
     *
     * @param DoctrineRestServiceEntity $original
     * @param DoctrineRestServiceEntity $update
     */
Update the content negotiation configuration for the service
@param DoctrineRestServiceEntity $original
@param DoctrineRestServiceEntity $update
Update the content negotiation configuration for the service @param DoctrineRestServiceEntity $original @param DoctrineRestServiceEntity $update
public function updateContentNegotiationConfig(
        DoctrineRestServiceEntity $original,
        DoctrineRestServiceEntity $update
    ) {
        $baseKey = 'zf-content-negotiation.';
        $service = $original->controllerServiceName;
        if ($update->selector) {
            $key = $baseKey . 'controllers.' . $service;
            $this->configResource->patchKey($key, $update->selector);
        }
        $acceptWhitelist = $update->acceptWhitelist;
        if (is_array($acceptWhitelist) && $acceptWhitelist) {
            $key = $baseKey . 'accept_whitelist.' . $service;
            $this->configResource->patchKey($key, $acceptWhitelist);
        }
        $contentTypeWhitelist = $update->contentTypeWhitelist;
        if (is_array($contentTypeWhitelist) && $contentTypeWhitelist) {
            $key = $baseKey . 'content_type_whitelist.' . $service;
            $this->configResource->patchKey($key, $contentTypeWhitelist);
        }
    }
public function updateContentNegotiationConfig ( DoctrineRestServiceEntity $ original , DoctrineRestServiceEntity $ update ) { $ baseKey = 'zf-content-negotiation.' ; $ service = $ original -> controllerServiceName ; if ( $ update -> selector ) { $ key = $ baseKey . 'controllers.' . $ service ; $ this -> configResource -> patchKey ( $ key , $ update -> selector ) ; } $ acceptWhitelist = $ update -> acceptWhitelist ; if ( is_array ( $ acceptWhitelist ) && $ acceptWhitelist ) { $ key = $ baseKey . 'accept_whitelist.' . $ service ; $ this -> configResource -> patchKey ( $ key , $ acceptWhitelist ) ; } $ contentTypeWhitelist = $ update -> contentTypeWhitelist ; if ( is_array ( $ contentTypeWhitelist ) && $ contentTypeWhitelist ) { $ key = $ baseKey . 'content_type_whitelist.' . $ service ; $ this -> configResource -> patchKey ( $ key , $ contentTypeWhitelist ) ; } }
Update the content negotiation configuration for the service
 @param DoctrineRestServiceEntity $original
 @param DoctrineRestServiceEntity $update
Update the content negotiation configuration for the service @param DoctrineRestServiceEntity $original @param DoctrineRestServiceEntity $update