src/Admin/Model/DoctrineRestServiceModel.php
/**
     * Update REST configuration
     *
     * @param DoctrineRestServiceEntity $original
     * @param DoctrineRestServiceEntity $update
     */
Update REST configuration
@param DoctrineRestServiceEntity $original
@param DoctrineRestServiceEntity $update
Update REST configuration @param DoctrineRestServiceEntity $original @param DoctrineRestServiceEntity $update
public function updateRestConfig(DoctrineRestServiceEntity $original, DoctrineRestServiceEntity $update)
    {
        $patch = [];
        foreach ($this->restScalarUpdateOptions as $property => $configKey) {
            if (! $update->$property) {
                continue;
            }
            $patch[$configKey] = $update->$property;
        }
        if (empty($patch)) {
            goto updateArrayOptions;
        }
        $config = ['zf-rest' => [
            $original->controllerServiceName => $patch,
        ]];
        $this->configResource->patch($config, true);
        updateArrayOptions:
        foreach ($this->restArrayUpdateOptions as $property => $configKey) {
            if ($update->$property === null) {
                continue;
            }
            $key = sprintf('zf-rest.%s.%s', $original->controllerServiceName, $configKey);
            $this->configResource->patchKey($key, $update->$property);
        }
    }
public function updateRestConfig ( DoctrineRestServiceEntity $ original , DoctrineRestServiceEntity $ update ) { $ patch = [ ] ; foreach ( $ this -> restScalarUpdateOptions as $ property => $ configKey ) { if ( ! $ update -> $ property ) { continue ; } $ patch [ $ configKey ] = $ update -> $ property ; } if ( empty ( $ patch ) ) { goto updateArrayOptions ; } $ config = [ 'zf-rest' => [ $ original -> controllerServiceName => $ patch , ] ] ; $ this -> configResource -> patch ( $ config , true ) ; updateArrayOptions : foreach ( $ this -> restArrayUpdateOptions as $ property => $ configKey ) { if ( $ update -> $ property === null ) { continue ; } $ key = sprintf ( 'zf-rest.%s.%s' , $ original -> controllerServiceName , $ configKey ) ; $ this -> configResource -> patchKey ( $ key , $ update -> $ property ) ; } }
Update REST configuration
 @param DoctrineRestServiceEntity $original
 @param DoctrineRestServiceEntity $update
Update REST configuration @param DoctrineRestServiceEntity $original @param DoctrineRestServiceEntity $update